Forums › ProRealTime English forum › ProOrder support › Multi timeframe and countofposition › Reply To: Multi timeframe and countofposition
03/23/2020 at 3:12 AM
#122966
Hi Guys,
Thanks for replying, you can do a simple test on your end that you know will work for you too.
Just need to made use of countofposition as the key function in the higher timeframe then default.
i modify the code below to show exactly what i meant. You can just copy the code below to see if my interpretation is wrong.
Since 15 minutes, updateonclose. It should hit at least 5 times. but not once will it hit..
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 |
timeframe (15minutes, updateonclose) if countofposition[1]>0 then Show15=1 elsif countofposition[1]=0 then//even after multiple 15 minutes the count of position will still be 0 Show15=-1 endif timeframe(default)/// set to 1minute if not longonmarket and countofposition[100]=0 then buy 1 contract at market endif if longonmarket and countofposition[100]>0 then Sell at market endif if Show15=1 and longonmarket then Show1=1 elsif show15=-1 and longonmarket then show1=-1 endif Graph show1 as “show1” show1=0 |