Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    83 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    65 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    57 views
    0 likes
    Last Post CarlTrading  
    Working...
    X