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

Absent Plot instruction

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

    Absent Plot instruction

    Hello.
    I am learning NinjaScript, (slowly) and have found something I don't understand in the supplied indicators, e.g. the SMA. I cannot find a Plot instruction anywhere. Is there an explanation of this that anyone can point me at please? I have written some simple indicators now, and as far as I am aware, I have to use Plot to get them on the screen.

    #2
    In the Intialize() method, you will see Add() which adds a plot object that is used to visualize the indicator values.

    Here is more information on the relationship to an Indicators values and its plots.

    RayNinjaTrader Customer Service

    Comment


      #3
      I see, Plot is not an instruction, but just a sort of specification object that describes how a plot will look, and Value.Set will plot the associated DataSeries.
      If that is the case, how come I can say Plot0.set(........
      and get a plot of ........ ? Surely I should have to say Value.Set ?
      I thought at first that this was connected to the Add statement because the Wizard set it to :-
      Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));

      but if I replace "Plot0" in this statement with "Fred", or whatever, and recompile, it has no effect whatever. So what does "Plot0" do in the Add instruction.

      I have done a bit of object oriented programing, I can program in Visual C++, but this is downright confusing.

      Comment


        #4
        It is the name of the plot itself which is used to as display in the Indicator dialogue window under the Plots section.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,991 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        7 views
        0 likes
        Last Post TAJTrades  
        Started by rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by realblubb, Today, 09:28 AM
        0 responses
        8 views
        0 likes
        Last Post realblubb  
        Started by AaronKoRn, Yesterday, 09:49 PM
        1 response
        19 views
        0 likes
        Last Post Rikazkhan007  
        Working...
        X