CO/USA
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
Posts: 129 since Jun 2020
Thanks Given: 70
Thanks Received: 157
|
vars:
TodayLow(0),
TodayHigh(0);
TodayLow = LowD(0);
TodayHigh = HighD(0);
Plot1(TodayLow,"TodayLow");
Plot2(TodayHigh,"TodayHigh");
Now be careful if wanting the session high if a session rolls into two days. For example, certain futures might start trading at 5 PM Central time and you may want the session low/high rather than the day. If this is the case you can use LowSession(0,0) and HighSession(0,0) to get the high and low of a given session. Or you could do something like the below
inputs:
Day1Session2(1);//Changing between 1 and 2 will change how High/Low is calculated
vars:
TodayLow(0),
TodayHigh(0);
If Day1Session2 = 1 then begin
TodayLow = LowD(0);
TodayHigh = HighD(0);
end
else if Day1Session2 = 2 then begin
TodayLow = LowSession(0,0);
TodayHigh = HighSession(0,0);
end;
Plot1(TodayLow,"TodayLow");
Plot2(TodayHigh,"TodayHigh");
|