TIMEFRAMES DISALLOWED BY AUTO-TRADE
Forums › ProRealTime English forum › ProOrder support › TIMEFRAMES DISALLOWED BY AUTO-TRADE
- This topic has 2 replies, 2 voices, and was last updated 8 years ago by GraHal.
-
-
04/03/2016 at 3:50 PM #4792
Hello
What would be a way to submit to Auto-Trade a strategy (that gives max profit optimised over 4 years) on a 9 hour timeframe? As we know ProRealTime won’t allow 9 hour time frames on Automatic Trading.
Is something like below feasible (Code for SellShort shown for simplicity) and submit to Auto-Trade on a 1 hour timeframe? I tried it but it doesn’t execute at 09:00 and 18:00 like a 9 hour timeframe does.
I could spend ages trying to suss out what is going on, but you guys are so helpful on here and you may know the answer instantly?
Auto-Trade seems to always check conditions / start again at midnight (or at least it does on my Backtest on a 9 hour timeframe) hence the inclusion of 000000. Bars show at 09:00, 18:00 and 00:00 on Backtest on a 9 hour timeframe.
I tried below but it doesn’t give the same results as usng a 9 hour timeframe.
Code for SellShort shown for simplicity (I also tried Time = etc) :
1234IF (CurrentTime = 090000) OR (CurrentTime = 180000) OR (CurrentTime = 000000) AND c3 THENSELLSHORT 1 PERPOINT AT MARKETENDIFHope above makse sense, if not let me know?
Many Thanks
GraHal
PS I wish there was a ‘save as draft’ on here as I have to go out now, but probably will think of a better way to explain above with more time.04/03/2016 at 5:06 PM #479904/04/2016 at 9:39 AM #4819Hi Nicolas
You were sooo right (again! ha).
After many trials, I got it working better by using the code below based on the ‘official timezone of the instrument’.
123IF (Time = 120000 or Time = 030000 or Time = 180000) AND c1 THENSellShort 1 PERPOINT AT MARKETENDIFBut even then there were not many deals initiated and then I reflected on what you said … I was using ‘Cross Over / Cross Under’ on the 9 hour timefrae and this criteria wasn’t being met in all instances on the 1 hour timeframe. So I changed ‘Cross Over / Cross Under’ to > / < and then I got loads of deals initiated.
So the above principle can be adapted for a Timeframe which is disallowed by PRT Auto-Trade.
Many Thanks
GraHal
-
AuthorPosts