Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I insert a MultiTimeFrame Strategy into a chart?

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

    Can I insert a MultiTimeFrame Strategy into a chart?

    That's my question because when I implemented my MultiTimeFrame Strategy on the chart, the results are completely different from the backtest

    #2
    cozar534,

    Adding a multi-time frame strategy to a chart uses whichever time frame the chart is as the primary bar series. Be sure to add the strategy to a chart of the proper time series you intend to run the strategy on.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      But, well I'll show on pictures. Please tell me what is wrong because the backtest in a 3min chart shows me different results as if I insert the Strategy on a 3min chart..
      I'll also upload the script. Please tell me what is wrong
      Attached Files

      Comment


        #4
        Please ensure you are actually running with the same parameters. Your EMA's are different across the two screenshots.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Here is the Real Chart with the same EMA's as the backtest...
          Attached Files

          Comment


            #6
            It's the same as with the other EMA's, the entrys differs from the backtest too much

            Comment


              #7
              Josh, can you check the script and tell me if it's what I really want, please?? the Strategy should be (what I want it to do):

              If MACD on a 15min chart (that's BarArray[2]) is over MACD.Avg
              AND Stochastic on a 3min chart (BarArray[1] and also the chart I want to run the strategy in), is below 20
              then open Long position

              If MACD on a 15min chart (that's BarArray[2]) is over MACD.Avg
              AND Stochastic on a 3min chart (BarArray[1] and also the chart I want to run the strategy in), is above 80
              then open Short position

              If CurrentMarket Position is Long
              AND EMA(10) CrossBelow EMA(18)
              then Exit Long Position

              If CurrentMarket Position is Short
              AND EMA(10) CrossAbove EMA(18)
              then Exit Short Position

              Comment


                #8
                cozar534,

                Unfortunately I cannot debug the code for you. You will just have to step through it slowly and print out where it is trading and why it evaluated those conditions to true on the chart, but not in the Strategy Analyzer.

                Please absolutely ensure your chart starts at the same date and time as your Strategy Analyzer. It is very important this is the case as well as you having the exact same data set when you ran it on the chart and when you ran it in the Strategy Analyzer. Please download your data from your data provider and then disconnect. Connect up to the External Data Feed so you can add the strategy to the chart, but without ever having the possibility of fetching data from your provider again. That will ensure you have the same data set.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by funk10101, Today, 09:43 PM
                0 responses
                3 views
                0 likes
                Last Post funk10101  
                Started by pkefal, 04-11-2024, 07:39 AM
                11 responses
                36 views
                0 likes
                Last Post jeronymite  
                Started by bill2023, Yesterday, 08:51 AM
                8 responses
                44 views
                0 likes
                Last Post bill2023  
                Started by yertle, Today, 08:38 AM
                6 responses
                26 views
                0 likes
                Last Post ryjoga
                by ryjoga
                 
                Started by algospoke, Yesterday, 06:40 PM
                2 responses
                24 views
                0 likes
                Last Post algospoke  
                Working...
                X