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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X