multi timeframe question

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #219128 quote
    pointofbrew
    Participant
    New

    Hi everyone.

    Time is a crucial condition of my strategy and PRT doesn’t allow for time based order cancellations. Because I must wait for an actual candle to close before an order is deleted, this forces me to trade from a lower timeframe than what I normally would and aggregate the candles. E.g. I would normally trade a M5 timeframe, but in order to cancel an order e.g. after 2 minutes, I can’t wait for a M5 candle to close. That’s 5 minutes. So I must trade M1 candles based on my M5 setups, mark up the high and low of five period M1 candles which is then equal to the high and low of the M5 candle.

    Now I’m able to stop an order from repeating after 2 minutes, but my question is if it’s possible to place orders at e.g. high of a candle with a different timeframe than from the timeframe the algo is running on?

    I have read about multi timeframe support, but this still remains unclear to me.

    Thanks in advance

    #219131 quote
    GraHal
    Participant
    Master

    Yes you can do what you want, below is an example, courtesy of JS from the link

    MULTITIMEFRAME AUTOMATIC TRADING

    DefParam CumulateOrders=False
    TimeFrame(5 minutes, UpDateOnClose)
    Zenith=High+4*pipsize
    TimeFrame(Default) //TF 10 seconds
    If Close>=Zenith then
    Buy 1 contract at Market
    EndIf
    If OnMarket and BarIndex-TradeIndex>=30 then
    Sell at Market
    EndIf
    GraphOnPrice Zenith
    pointofbrew, robertogozzi and Midlanddave thanked this post
    #219288 quote
    pointofbrew
    Participant
    New

    Thanks a million!

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

multi timeframe question


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by pointofbrew
2 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/15/2023
Status: Active
Attachments: No files
Logo Logo
Loading...