0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Can't plot daily high & low
#478375
10/09/19 17:35
10/09/19 17:35
|
Joined: Oct 2019
Posts: 3
vivaldi2
OP
Guest
|
OP
Guest
Joined: Oct 2019
Posts: 3
|
I am trying to plot yesterday high and low, but it return something different : function run()
{
BarPeriod = 30;
LookBack = 0;
asset("EUR/USD");
var session_high = dayHigh(UTC,1); //
var session_low = dayLow(UTC,1); //
var session_pivot1 = dayPivot(UTC,1); //
plot("USUTC-1 Session High Price", session_high, MAIN, GREEN);
plot("USUTC-2 Session Low Price", session_low, MAIN, GREEN);
plot("USUTC-3 Session Pivot", session_pivot1, MAIN, YELLOW);
} what is wrong with my code ?
|
|
|
Re: Can't plot daily high & low
[Re: vivaldi2]
#478384
10/11/19 11:04
10/11/19 11:04
|
Joined: Sep 2003
Posts: 929
Spirit
Moderator
|
Moderator
Joined: Sep 2003
Posts: 929
|
|
|
|
Re: Can't plot daily high & low
[Re: vivaldi2]
#478398
10/13/19 16:16
10/13/19 16:16
|
Joined: Oct 2019
Posts: 2 toronto
Junker
Guest
|
Guest
Joined: Oct 2019
Posts: 2
toronto
|
I agree with @vivaldi2. i am learning this now and i used the same formula but applied to 1 minute and in ET timezone. my understanding of dayLow is that it gets the yesterday's lowest price of the day and dayHigh gets the yesterdays highest price for the day. The day high seems to be working properly. but the day low is not. formula i used is as below
function run()
{
BarPeriod = 1;
LookBack = 0;
asset("EUR/USD");
var session_high = dayHigh(ET,1); //
var session_low = dayLow(ET,1); //
var session_pivot1 = dayPivot(ET,1); //
plot("USUTC-1 Session High Price", session_high, MAIN, GREEN);
plot("USUTC-2 Session Low Price", session_low, MAIN, GREEN);
plot("USUTC-3 Session Pivot", session_pivot1, MAIN, YELLOW);
}
|
|
|
Re: Can't plot daily high & low
[Re: vivaldi2]
#478400
10/13/19 23:51
10/13/19 23:51
|
Joined: Oct 2019
Posts: 2 toronto
Junker
Guest
|
Guest
Joined: Oct 2019
Posts: 2
toronto
|
i took away @vivaldi2 thread. so cannot comment. However, i removed the lookback and still get the same result. my guess is that this formula is ignoring prices before 9.30 EST which is the US trading hours. How can i make it look at 24 hour charts x 5 days as the forex works that way?
function run()
{
BarPeriod = 30;
asset("EUR/USD");
var session_high = dayHigh(ET,1); //
var session_low = dayLow(ET,1); //
var session_pivot1 = dayPivot(ET,1); //
plot("USUTC-1 Session High Price", session_high, MAIN, GREEN);
plot("USUTC-2 Session Low Price", session_low, MAIN, GREEN);
plot("USUTC-3 Session Pivot", session_pivot1, MAIN, YELLOW);
}
|
|
|
|