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

How do I plot only the last period of an indicator?

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

    How do I plot only the last period of an indicator?

    I hope somebody can help me with this, please.

    I have an indicator that plots like a moving average but instead of plotting a line, it plots a cross. This plot is also displaced one period into the future. The displacement and the crosses are not a problem. Instead of a whole series of crosses, all I want to see is the last cross to the right of the latest bar. I presume that this can be done by making the latest plot red for example and the rest transparent, but I have no idea how to get the plot to make that colour switch just on the latest period.

    Any suggestions, please? Many thanks in advance for any help.

    #2
    Hello OldGreyWT,

    You can unset previous plots using Reset(int barsAgo).


    You can also set the color of plots on specific bars to transparent using PlotColors[int plot index][int barsAgo].
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by gravdigaz6, Today, 11:40 PM
    0 responses
    2 views
    0 likes
    Last Post gravdigaz6  
    Started by MarianApalaghiei, Today, 10:49 PM
    3 responses
    9 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by XXtrader, Today, 11:30 PM
    0 responses
    3 views
    0 likes
    Last Post XXtrader  
    Started by love2code2trade, Yesterday, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Started by funk10101, Today, 09:43 PM
    0 responses
    9 views
    0 likes
    Last Post funk10101  
    Working...
    X