Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to program multiple timeframe confluence?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to program multiple timeframe confluence?

    Hi I would like to program a strategy to trade when both 1) moving averages of 30 min time frame cross up and 2) moving averages of 5 min time frame cross up.

    My initial thought is to to build two strategies, and when 30 min chart's moving averages cross up, I write a true value into a text file, so that the 5 min chart strategy can read the text file and tell if the 30 min is at cross up status.

    But I wonder if there are smarter ways to do the same.

    1) is there a better way to let two strategies to communicate with each other? like in memory?
    2) or better, is there a way to have one strategy run on two time frame data?

    Thank you!
    Last edited by leontancfa; 06-02-2012, 05:11 PM.

    #2
    barrs array would do this however why use a 30 min chart why not an average of an average that resembels a 30 min time frame. Barrs array has the odd issue like when the 30 min bar updates it may drop whats happening on the lower time frame untill a bar has completed etc. If you can keep it on one time frame it has some advantages like a 200 and 400 cross above lookback 2 hours enter long 5 cross above 20.
    Hope this helps raef
    Helping you to rise above the rest.
    Last edited by raefon72; 06-02-2012, 05:10 PM.

    Comment


      #3
      Originally posted by leontancfa View Post
      Hi I would like to program a strategy to trade when both 1) moving averages of 30 min time frame cross up and 2) moving averages of 5 min time frame cross up.

      My initial thought is to to build two strategies, and when 30 min chart's moving averages cross up, I write a true value into a text file, so that the 5 min chart strategy can read the text file and tell if the 30 min is at cross up status.

      But I wonder if there are smarter ways to do the same.

      1) is there a better way to let two strategies to communicate with each other? like in memory?
      2) or better, is there a way to have one strategy run on two time frame data?

      Thank you!
      A multi-timeframe strategy might make more sense in that scenario.

      Comment


        #4
        Originally posted by leontancfa View Post
        Hi I would like to program a strategy to trade when both 1) moving averages of 30 min time frame cross up and 2) moving averages of 5 min time frame cross up.

        My initial thought is to to build two strategies, and when 30 min chart's moving averages cross up, I write a true value into a text file, so that the 5 min chart strategy can read the text file and tell if the 30 min is at cross up status.

        But I wonder if there are smarter ways to do the same.

        1) is there a better way to let two strategies to communicate with each other? like in memory?
        2) or better, is there a way to have one strategy run on two time frame data?

        Thank you!
        Do u have more than 512k ram? Then memory is really not a concern...

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, Yesterday, 01:02 PM
        0 responses
        25 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        17 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        160 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        94 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        147 views
        2 likes
        Last Post CaptainJack  
        Working...
        X