TIMEFRAMES DISALLOWED BY AUTO-TRADE

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4792 quote
    GraHalGraHal
    Participant
    Master

    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) :

    IF (CurrentTime = 090000) OR (CurrentTime = 180000) OR (CurrentTime = 000000) AND c3 THEN
     SELLSHORT 1 PERPOINT AT MARKET
    
    ENDIF

     

    Hope 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.

    #4799 quote
    NicolasNicolas
    Keymaster
    Legend

    Hello GraHal, what are your conditions to launch trade? Maybe conditions are not met on 1 hour timeframe and that’s why your trade are not initiated?

    #4819 quote
    GraHalGraHal
    Participant
    Master

    Hi 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’.

    IF (Time = 120000 or Time = 030000 or Time = 180000) AND c1 THEN
     SellShort 1 PERPOINT AT MARKET
    ENDIF

     

    But 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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

TIMEFRAMES DISALLOWED BY AUTO-TRADE


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by GraHalGraHal
10 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/03/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...