Forums › ProRealTime English forum › ProRealTime platform support › request & warning graph(onprice) › Reply To: request & warning graph(onprice)
03/23/2019 at 4:46 PM
#94505
I did test it but lines didn’t go to zero when there was no market position.
Ooops sorry – one of my usual forgets. Always zero the values if you ever want them to be zero! Try this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
if time >= 080000 and COUNTOFPOSITION < 1 and close > dopen(0) then buy 1 contract at market endif a = 0 b = 0 c = 0 d = 0 e = 0 f = 0 if onmarket then a = dclose(1) b = dclose(2) c = dclose(3) d = dclose(4) e = dclose(5) f = dclose(6) endif if time = 173000 then sell at market endif graphonprice a graphonprice b graphonprice c graphonprice d graphonprice e graphonprice f |
Once again not tested!