Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

same plot, same strategy, different exit !!!

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

    same plot, same strategy, different exit !!!

    Hello,
    attached the picture of the chart of the stock TOM2 (Netherlands) loaded with the same strategies.
    The exits are not equal. The chart on to the workspaces has delayed the exit (left chart, last exit).
    Instead, if I do the same chart separately, not through the workspaces, the exit is correct (right chart, last exit)
    Why ?
    Ciao.
    Roberto
    Attached Files

    #2
    Hi Roberto, I guess I'm not sure what you mean by 'chart through the workspaces' - can you explain please? Are both charts used using the same settings for days back and session template applied?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,
      The problem is this:
      the stock TOM2 (Netherlands) Daily Yahoo is loaded into a my workspace of Ninja with 1 strategy. When I open the workspace and active strategy, I noticed that the exit is delayed (left chart, last exit). But if I take the same chart Daily Yahoo with file-new-chart and active the same strategy, the exit is OK (right chart, last exit).
      Ciao.
      Roberto
      Attached Files

      Comment


        #4
        Ok Roberto, thanks got it - so with what session templates would you be working on both charts then? Would they be the same then?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I just wanted to know why there are these differences exit, if the problem is Yahoo, my code or Ninja.
          Thank you Bertrand
          Ciao

          Comment


            #6
            Italy / Roberto, I believe it would be found in the used session template for your charts, as the data shouldn't have changed as well as the code.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Excuse Bertrand
              I can not understand what you mean.
              I used the same Daily chart with the same period, for example, from 01.01.2003 to date in both charts. I use the same code, but as you can see from the chart last exit is different. I noticed this problem because my code draws 2 line ( StopLoss and a Target), when the trade is active. The code:

              DrawHorizontalLine("tag1",Position.AvgPrice-RAPETDShortDataSeries[0]-(ATR(5)[0]/divisoreShort),Color.Blue);
              DrawHorizontalLine("tag2",Position.AvgPrice*(1+0.0 4),Color.Red);

              DrawText("tag3"," StopLossShort PivotRap 4% ",0,Position.AvgPrice*(1+0.04),Color.Magenta);
              DrawText("tag4"," ProfitShort PivotRap ",0,Position.AvgPrice-RAPETDShortDataSeries[0]-(ATR(5)[0]/divisoreShort),Color.Magenta);


              and the exit is StopLoss (Red line)

              protected override void Initialize()
              SetStopLoss(CalculationMode.Percent,0.04);

              or target (blue line)

              if(Close[0]<(Position.AvgPrice- RAPETDShortDataSeries[0]-(ATR(5)[0]/divisoreShort)))


              {
              ExitShort("ExitShortRPivot", "ShortRPivot"); // Target

              }

              In the left chart, the last exit is delayed, while the right chart the last exit is perfect.
              Orizontal lines, clears when the trade is closed.
              Tank you.
              Roberto
              Attached Files

              Comment


                #8
                Hi Italy, please try on both charts with freshly reloaded data and if you right click on the chart and go into the Format Data Series dialog box - are then both charts you apply the strategy to set to the same session template then? This would define the session begin and end hours on intraday charts and for daily and higher it would mean which timezone is used for the bar end time stamping, so it could influence the candle formation and your trade execution seen.

                Thanks,
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  For chart, use the same data series, because in the Instrument Manager I created the yahoo link to the Daily European stocks. In these charts I downloaded and saved strategies.
                  I use about 150 stocks (European American), divided into 5 workspaces.
                  When I open a workspaces, loading charts, then active the strategie stored.

                  The problem is not only what occurs in TOM2 stocks, there is also another problem.

                  Occurs, always on the same stocks, (about 10,between Europeans and Americans ) that when I open the workspaces, you load stocks and active strategies, always on the same stocks, you do not see the chart (white screen). Every time I have to, delete and reload the strategy, to see the chart with the signals of the strategy.

                  Thank you for everything.
                  Ciao.
                  Roberto









                  Comment


                    #10
                    Hi Roberto, I will have Bertrand get back to you on Monday.
                    AustinNinjaTrader Customer Service

                    Comment


                      #11
                      Hi Roberto, from this descriptions this sounds like an issue you worked before with Matthew on? It would be great if you could provide your log and traces files to me via Help > Mail to Support so I could review for any error messages that would provide insight why this might be happening.

                      Thanks in advance,
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Hello Bertrand,
                        attached, the Log and Trace files today.
                        For example, before I started Ninja and open workspaces which contains about 50 stocks of S&P 500 which are loaded strategies, with the link Yahoo Daily.
                        Also on the same stocks (AMT - MON - PFG - COL) when I open the chart to see the signal of the strategy, the page is white. I have to every time, eliminating the strategy, recharge and re-enable it, to see everything perfectly. However, when I close and then reopen Ninja, the problem comes back again. I tried connecting Kinetick, same problem.
                        In previous versions of Ninja, I've never had this problem.
                        Ciao.
                        Grazie.
                        Roberto
                        Attached Files

                        Comment


                          #13
                          Ciao Roberto, we would need to understand what study is being run on those charts / workspaces that would throw this error message : 2011-09-26 16:32:55:602 Chart.ChartControl.OnPaint: Errore di overflow.

                          This is likely the culprit for the blank charts seen here in your setup - what studies do you run besides those strategies?
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            Bertrand, sorry I did not understand what to do.
                            I use, No.3 codes that are called:
                            CCIRap, PivotRap, LinregRap.
                            Problems have occurred on all 3 codes.
                            Ciao.
                            Roberto

                            Comment


                              #15
                              Thanks Roberto, so those indicators / codes are needed by your strategies for the signals you use or not? If not, then please try with those uninstalled from the platform and then also remove them from your workspaces, so we could see if the error message in the trace file would still be showing up.
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by fx.practic, 10-15-2013, 12:53 AM
                              5 responses
                              5,404 views
                              0 likes
                              Last Post Bidder
                              by Bidder
                               
                              Started by Shai Samuel, 07-02-2022, 02:46 PM
                              4 responses
                              95 views
                              0 likes
                              Last Post Bidder
                              by Bidder
                               
                              Started by DJ888, Yesterday, 10:57 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by MacDad, 02-25-2024, 11:48 PM
                              7 responses
                              159 views
                              0 likes
                              Last Post loganjarosz123  
                              Started by Belfortbucks, Yesterday, 09:29 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post Belfortbucks  
                              Working...
                              X