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

Calling indicator from Strategy

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

    Calling indicator from Strategy

    I have developed an indicator which uses three built in DataSeries ie Close, High, Low from several barsAgo.

    I notice that the constructors( Ninja Generated ) associated with the Indicator use Input as the DataSeries, which as I understand defaults to the Series of the calling strategy (Last, Bid, or Ask).

    Will my indicator access the High, Low, and Close, or only the Last value ie Close from barsAgo?

    If not, how do I insert my own constructor to accomplish this?

    thanks

    #2
    Hello,

    Thank you for the question.

    In an indicator, if you are using Close[0] High[0] Low[0] etc. This would reference the input series for the indicator. So in this case, if you were to apply the indicator to a 1 minute chart and have the InputSeries as the instruments Close prices, the values would refer to the 1 minute series close prices for Close[0] and the High and Low series for 1 minute.

    Instead in your script if you reference Input[0], that would directly be the series being input, the SMA is a good example of Input usage. If you apply the SMA to a chart and choose another indicator as the SMA's input series, the logic in the SMA uses Input[0] so the SMA would use the other indicators series as its input value.

    If you were to supply a series that does not have High or Low, for example supplying the ADL to the SMA as an input series, High and Low would be the same as Input in that case as there is no High or Low series for the indicator being input.

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,771 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X