amirfutures
New member
I have the following script for RTH Opening price. Need help to apply it to RTH Closing price.
This script works on Range bar, I don't use time base bars.
Thanks
def Time =
GetTime()
;
def Start =
RegularTradingStart(GetyYYYMMDD())
;
def First =
Time > Start and Time[1] <= Start
;
def Opening =
if First then Open
else Opening[1]
;
plot aLine = Opening;
aLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
plot bLine = Opening + 6;
bLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
plot cLine = Opening - 6;
cLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
# End code
This script works on Range bar, I don't use time base bars.
Thanks
def Time =
GetTime()
;
def Start =
RegularTradingStart(GetyYYYMMDD())
;
def First =
Time > Start and Time[1] <= Start
;
def Opening =
if First then Open
else Opening[1]
;
plot aLine = Opening;
aLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
plot bLine = Opening + 6;
bLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
plot cLine = Opening - 6;
cLine.setPaintingStrategy(paintingStrategy.HORIZONTAL);
# End code