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

Color Stochastic in N7

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

    Color Stochastic in N7

    I have imported an indicator called Stochastic color, it works but in previous 6.5 ( %D) was green when up, yellow when neutral and red when down, instead I have 2 (% D) lines 1 green and 1 red instead of being on same one so it would seems they do not draw on same line.

    I am sure it comes from somewhere from the lines below, anyone could hel me on this .

    Thanks

    // Plot green if the %D is rising
    // Rising() returns true when the current value is greater than the value of the previous bar.
    if (Rising(Stochastics(PeriodD, PeriodK, Smooth).D))
    {
    // Connects the rising plot segment with the other plots
    RisingPlot.Set(1, Stochastics(PeriodD, PeriodK, Smooth).D[1]);

    // Adds the new rising plot line segment to the line
    RisingPlot.Set(Stochastics(PeriodD, PeriodK, Smooth).D[0]);
    }

    // Plot red if the %D is falling
    // Falling() returns true when the current value is less than the value of the previous bar.
    else if (Falling(Stochastics(PeriodD, PeriodK, Smooth).D))
    {
    // Connects the new falling plot segment with the rest of the line
    FallingPlot.Set(1, Stochastics(PeriodD, PeriodK, Smooth).D[1]);

    // Adds the new falling plot line segment to the line
    FallingPlot.Set(Stochastics(PeriodD, PeriodK, Smooth).D[0]);
    }

    // Plot yellow if the %D is neutral
    else
    {
    // Connects the neutral plot segment with the rest of the line
    NeutralPlot.Set(1, Stochastics(PeriodD, PeriodK, Smooth).D[1]);

    // Adds the new neutral plot line segment to the line
    NeutralPlot.Set(Stochastics(PeriodD, PeriodK, Smooth).D[0]);

    #2
    Larry22, thanks for reporting this in - we're currently reviewing issues in this area.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, Today, 06:53 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottWalsh, Today, 06:52 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottW, Today, 06:09 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    256 views
    0 likes
    Last Post KeyonMatthews  
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X