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

Ichimochu Cloud

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

    Ichimochu Cloud

    I saw an ichimochu cloud indicator by Ninjatrader_Jim uploaded to the ecosystem and while I can do a basic price comparison with all of the spans, for some reason when I do a basic comparison of the lagging spanner to the cloud span lines at 52 bars ago, it does not work. Every bar meets the condition even though I can clearly see it does not. Any thoughts on why this would happen? Does a 0 bars ago to 52 bars ago comparison not work for any reason I don't know?

    Sam

    #2
    Hello Sam,

    Thanks for your post.

    Please be sure to use prints when checking your work as your condition should be written to use the values the script sees as opposes to what is visible on the chart. (Prints can be viewed in the NinjaScript Output window.) The indicator displaces the cloud forward 26 bars, so conditions should be used to mind this when referencing SenkouSpan plots. The lagging span is also 26 bars behind other plots.

    I have attached some examples showing how some conditions can be made.

    Print() - https://ninjatrader.com/support/help...nt8/?print.htm

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello Sam,

      Thanks for your post.

      Please be sure to use prints when checking your work as your condition should be written to use the values the script sees as opposes to what is visible on the chart. (Prints can be viewed in the NinjaScript Output window.) The indicator displaces the cloud forward 26 bars, so conditions should be used to mind this when referencing SenkouSpan plots. The lagging span is also 26 bars behind other plots.

      I have attached some examples showing how some conditions can be made.

      Print() - https://ninjatrader.com/support/help...nt8/?print.htm

      We look forward to assisting.
      I keep coming back to this and I am not sure this has answered my question. I understand that the Lagging Span and the Senkou Span A and B are displaced 26 bars before and after. My problem is that no matter what I do, the Lagging Span does not affect the script at all. If I use the Strategy Builder to create just a simple crossover of the Lagging and Senkou B, it does nothing.

      Example:

      if Chikou[0] > Senkou[0]

      EnterLong
      //Does nothing

      if Chikou[26] > Senkou[0]

      EnterLong
      //Does nothing

      if Chikou[26] > Senkou[26]

      EnterLong
      //Does nothing

      if Chikou[0] > Senkou[26]

      EnterLong
      //Does nothing

      if Chikou[0] > Senkou[52]

      EnterLong
      //Does nothing

      if Chikou[26] > Senkou[52]

      EnterLong
      //Does nothing

      if Chikou[52] > Senkou[26]

      EnterLong
      //Does nothing


      Standard Ichimoku strategy entry depends on the LaggingSpan crossing below or above the cloud but the Senkou Spans and Chikou(Lagging) Span cannot produce a condition by any means. How do I use the Strategy Builder to build a crossover condition that can follow the displaced Chikou Span?

      PS: It is only the Chikou Sapn which does not respond.

      Comment


        #4
        Hello smcllr,

        Thanks for your post.

        The example attached tests the following condition using ChikouSpan

        Code:
        if ((IchimokuCloud1.ChikouSpan[27] <= IchimokuCloud1.SenkouSpanA[27])
        && (IchimokuCloud1.ChikouSpan[26] > IchimokuCloud1.SenkouSpanA[26]))
        Please note that because the values are displaced, I use BarsAgo references and check if the current bar (in this case 26 because the value is displaced 26 bars into the future) is greater, and the previous bar value is less than or equal. This creates the same functionality as CrossAbove.

        If you are not seeing any actions with your strategy logic, debugging prints should be used so you can see how the logic evaluates as it is executing. This will tell you what the values are as they are executing and can tell you why a condition has become true/has not become true so you can make changes.

        Debugging in the Strategy Builder - https://drive.google.com/file/d/1mTq...w?usp=drivesdk
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, 04-18-2024, 08:38 AM
        9 responses
        40 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by techgetgame, Yesterday, 11:42 PM
        0 responses
        9 views
        0 likes
        Last Post techgetgame  
        Started by sephichapdson, Yesterday, 11:36 PM
        0 responses
        2 views
        0 likes
        Last Post sephichapdson  
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,615 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Yesterday, 05:56 PM
        0 responses
        10 views
        0 likes
        Last Post jaybedreamin  
        Working...
        X