Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Timeframe problem

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

    Multi Timeframe problem

    Hello
    I'm trying to develop a strategy using indicators in a multi timeframe system, but something is not working right.

    I'm using 10s as the primary series and added a 15min as the secondary series.

    LOGIC: After the high cross above EMA50 on the 15min, look for an EMA21 cross below EMA50 on the 10sec chart.
    The first entry marked with RED on the 10sec chart was ignored, while the second entry marked with GREEN on the 10sec chart worked fine.

    If you look at the time on the 15Min chart you will notice that the bar that cross the EMA happened at 11:15 (11:00-11:15)
    Look at the entries on the 10sec chart. The first entry happened at 11:06, while the second entry happened at 11:28, therefore the second entry happened after the 15min bar closed.
    This is not the behavior Im expecting. The green circle indicates on both charts that the CrossAbove(Highs[1][0], EMA50,1) had already happened therefore, both entries should be valid.

    I cant figure out what is happening here and how to fix it. Any inputs on this matter?

    Thank you.
    Click image for larger version

Name:	image.png
Views:	214
Size:	227.6 KB
ID:	1272812

    #2
    Hello vertx,

    I would suggest trying to use some prints so that you can see what the strategy is actually doing in its logic. Comparing charts where the strategy is not applied would not be recommended because there may be differences from what the strategy is actually seeing. You can add prints into the strategies entry conditions to see when the become true. Alternatively you can add prints outside of the conditions to output values for each bar, that would be required to know when a cross condition should be true or not

    Comment


      #3
      Thank you for your reply Jesse. I was just coming here to update the post.
      I just solved the problem by using Calculate.OnEachTick AND using the PLAYBACK. Is there any way I can do that on the strategy analyzer?

      On a side note, although I used prints before (for very basic stuff) I'm not very good with it. Do you have any article/video explaining how to use it effectively? Especially when using multi timeframe.
      Thank you for your time.

      Comment


        #4
        Hello vertx,

        The strategy analyzer uses OnBarClose processing because that is historical data. Depending on your logic you may be able to use TickReplay in a backtest to simulate that.

        We have the following document which explains the basic use of prints however each strategy will be unique in regard to where you may need to place prints. A general rule to follow would be knowing when you want to print something, for example if you need to know a condition is true its best to put the print inside the condition. If you need to know a more broad amount of information its best to put the print directly in OnBarUpdate before your condition so you can output bar times and the values you used in your conditions. That helps you see how the strategy sees the data so you can understand why a condition may be false on a specific bar. That also helps you confirm the strategy is running the same as a chart you may have been comparing it against.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        53 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X