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 geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    60 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,287 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X