Variable optimisation for times of day
Forums › ProRealTime English forum › ProOrder support › Variable optimisation for times of day
- This topic has 8 replies, 2 voices, and was last updated 1 year ago by banjoo78.
-
-
06/03/2020 at 12:39 PM #134380
I have code that opens a trade at 080000, and I’d like to see whether 080500, 081000 etc is better, ie I’d like to be able to optimise a time variable during the variable optimisation. I’ve tried putting times like 080500 into the ‘Cable in program’ box in the Definition of Variables dialogue box, but with no success.
Is it possible to do this, and if so, how?
Thanks
06/03/2020 at 2:57 PM #13441106/03/2020 at 7:01 PM #134461I got it working. Thank you for that.
1 user thanked author for this post.
08/19/2023 at 10:32 PM #21935408/20/2023 at 2:11 PM #219368For Time >= xxxxxx
Try min = 000000 max = 230000 and step = 010000 (in the Optimiser to optimise to nearest 1 hour then narrow it down to nearest 1 minute etc).
For Hour = xx
Try min = 0 max = 23 step = 1 (in the optimiser)
If you need more explanation, just say which bit you don’t understand?
Code could be something like either of below …
1234567If Time >= 080000 ThenBuy at MarketEndifIf Hour = 140000 ThenBuy at MarketEndif1 user thanked author for this post.
08/20/2023 at 2:18 PM #21937008/20/2023 at 2:47 PM #219371For Time >= xxxxxx
Try min = 000000 max = 230000 and step = 010000 (in the Optimiser to optimise to nearest 1 hour then narrow it down to nearest 1 minute etc).
For Hour = xx
Try min = 0 max = 23 step = 1 (in the optimiser)
If you need more explanation, just say which bit you don’t understand?
Code could be something like either of below …
1234567If Time >= 080000 ThenBuy at MarketEndifIf Hour = 140000 ThenBuy at MarketEndif
Thank you so much!
I’m able to optimize with hours (I set 0-23 in optimizer) but not with time: in the optimizer I can’t set 000000 ’cause it replace with 0.I have to set pace 10000 (without first 0) so, the time will be 10000, 20000 etc
I wrong something?
thx
08/20/2023 at 5:35 PM #219375so, the time will be 10000, 20000 etc
Above is okay, so 10000 is 1 am in the morning. The Optimiser disregards leading 00’s, but it still works as a variable value in the code.
0 is also okay as that is midnight (000000).
We are kidding the Optimiser into working for us! 😉
2 users thanked author for this post.
08/20/2023 at 7:16 PM #219376 -
AuthorPosts
Find exclusive trading pro-tools on