Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ichimoku indicator spans A/B in backtest are invisible

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

    Ichimoku indicator spans A/B in backtest are invisible

    Hello,

    I was wondering if anyone tried backtesting strategy using Ichimoku indicator:


    I was trying to backtest it, however, for some reason the cloud (Span A/B) is not being drawn at all when looking at the backtest chart, and it is impossible to make the region visible (doesn't show up on chart).

    Could someone try backtesting Ichimoku and maybe tweak drawing to by similar on how it is in NT7 version? Also noticed that in NTy on daily chart drawing of the cloud is very limited, whiel in NT7 I can load 600 days or more and see cloud drawn while scrolling back multiple pages.

    As a workaround (to backtest my strategy) I could just create my own indicator based on my rules without breaking my head on how to fix cloud drawings (like creating some custom dataseries), however, would be very nice for this feature to work to see results visually after backtest.

    Thanks

    #2
    Hello,

    Thank you for reporting this issue. I'm not able to reproduce the issue currently -- when I run a backtest in the Strategy Analyzer, using a strategy which adds the Ichimoku indicator via AddChartIndicator(), I am seeing the cloud drawn as expected on the Strategy Analyzer Chart Display.

    Does this happen with any strategy that you test, or only a specific strategy? Are you using AddChartIndicator() to add the Ichimoku to the chart, or adding it manually? Is there a specific set of Backtest parameters you are using which reproduce the issue?
    Dave I.NinjaTrader Product Management

    Comment


      #3
      It was happening when I added it programmatically. However, I will try again creating a simple strategy to see if I can reproduce the issue there and will get back.

      I also noticed if you add Ichimoku on simple chart using daily period let's say 600 days, I was only seeing a small part of data where the cloud was drawn...

      Thanks

      Comment


        #4
        Thank you. Unfortunately I'm not seeing that on my end either. Loading a 600-day ES 12-15 chart, I saw the cloud go back all the way to the point where it had enough data to begin plotting. I look forward to hearing what else you find that may help us to reproduce the issue.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          I confirmed - loaded just the Ichimoku in a brand new strategy and it works as expected (paints for any time length), although in my strategy it doesn't paint the cloud. I will try to narrow it down by starting with just the Ichimoku and then slowly adding other indicators to see if there is some conflict...

          Thanks for fast response, will update if I run into issue or able to reproduce where exactly it happens...

          Comment


            #6
            Looks like I was able to reproduce...
            As soon as strategy tries to reference series like:
            if (ichimokuCloud.LagLine[26] > Math.Max(ichimokuCloud.SpanALine[52], ichimokuCloud.SpanBLine[52])
            && Low[0] > Math.Max(ichimokuCloud.SpanALine[26], ichimokuCloud.SpanBLine[26]))


            in the code I define ichimokuCloud by: private phIchimokuCloud ichimokuCloud;
            then later in Configure using:
            ichimokuCloud = phIchimokuCloud(9, 26, 52, 26);
            AddChartIndicator(ichimokuCloud);


            Basically - when trying to reference LagLine, SpanALine or SpanBLine - starting getting issues with drawing in chart...

            Another issue (don't know if it is by design or bug) - if I added indicator within strategy - after chart analysis is done through StrategyAnalyzer - I cannot remove that indicator (message that it is in use).

            And another issue - adding extra indicator into this chart like RSI - generates some constant big red line on the price chart along with Ichimoku.

            Thanks
            Attached Files
            Last edited by music_p13; 11-18-2015, 01:55 AM.

            Comment


              #7
              Thank you for drilling down into a reproducible scenario. I'll take a closer look at each of these issues today, and post back with any updates.
              Dave I.NinjaTrader Product Management

              Comment


                #8
                Note

                I am also experiencing issues with the Ichimoku indicator in Strategy Analyzer. If I run a backtest of a simple strategy (only a couple of conditions), the condition based on the Ichimoku indicator appears to work fine. However, if I run a backtest with a more complex strategy, with multiple conditions tied to the Ichimoku indicator, trades are triggering at incorrect times.

                Trying multiple different Ichimoku indicators produced the same results, so the issue does not appear to be with the indicator.
                Last edited by birdinhand; 11-18-2015, 11:49 AM. Reason: Note

                Comment


                  #9
                  Originally posted by music_p13 View Post
                  Looks like I was able to reproduce...
                  As soon as strategy tries to reference series like:
                  if (ichimokuCloud.LagLine[26] > Math.Max(ichimokuCloud.SpanALine[52], ichimokuCloud.SpanBLine[52])
                  && Low[0] > Math.Max(ichimokuCloud.SpanALine[26], ichimokuCloud.SpanBLine[26]))
                  I was able to reproduce the issue, but only in the Strategy Analyzer Chart Display. The cloud is drawing perfectly on my end on regular charts. Have you found this issue occurring with any other indicators, by chance? Since this is an unsupported indicator, I'll need to find out exactly what it is doing in drawing the cloud that is causing the issue. Do you have a simplified example script which would produce the same results?

                  I'm going to continue to investigate on my end, as well, to see if I can pinpoint the actual source of the issue in the script.

                  Update: It appears that all the indicator is doing to draw the cloud is to use DrawRegion(). However, when I create a test script using DrawRegion(), I do not see the same behavior. We will need to be able to isolate exactly what is causing this particular indicator to cause the issue.
                  Last edited by NinjaTrader_DaveI; 11-18-2015, 04:09 PM.
                  Dave I.NinjaTrader Product Management

                  Comment


                    #10
                    I haven't seen that behavior on other indicators. I would speculate - maybe it is somehow related to being able to draw clouds ahead of the price and it happens specifically in Chart Analyzer...?
                    Would let you make a deeper investigation....
                    One other issue I reproduced on 4 hours chart (real chart - not strategy analyzer):
                    1 - open default 4hr chart with Ichimoku for 5 days
                    2 - change DataSeried from 5 days to 50
                    3 - change then to 150 or 250 days to load minute data for 240 M chart.

                    Result - getting lots of days where cloud is not drawn (see screenshot).

                    As a temporary strategy workaround - should probably create couple of more duplicate series and try taking values from the duplicate series instead (would need to try it out when get some more time).
                    Thanks
                    Attached Files
                    Last edited by music_p13; 11-18-2015, 11:40 PM.

                    Comment


                      #11
                      Hello,
                      I opened a new topic instead - because it is really a bug.

                      Here is a link:


                      As a side note - it happened once - here is a screenshot (not sure how it happened) - see attached screenshot (Time[1] wasn't empty but "Low[1]" threw out of range exception). Once the "Draw.Region" part is fixed - I will keep an eye on any exception that could be thrown...

                      Thanks
                      Attached Files

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by The_Sec, Today, 02:29 PM
                      0 responses
                      1 view
                      0 likes
                      Last Post The_Sec
                      by The_Sec
                       
                      Started by tsantospinto, 04-12-2024, 07:04 PM
                      4 responses
                      62 views
                      0 likes
                      Last Post aligator  
                      Started by michi08, 10-05-2018, 09:31 AM
                      3 responses
                      741 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by sightcareclickhere, Today, 01:55 PM
                      0 responses
                      1 view
                      0 likes
                      Last Post sightcareclickhere  
                      Started by Mindset, 05-06-2023, 09:03 PM
                      9 responses
                      259 views
                      0 likes
                      Last Post ender_wiggum  
                      Working...
                      X