Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incrementing indicators

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

    Incrementing indicators

    If an indicator is sending 1 or 0 or -1 to my strategy builder, how can I catch it on only the first time it hits 1 or hits -1?
    (Without going into the indicator and using Variable++; and incrementing it?) thanks

    #2
    Hello ezrollin,

    Thanks for your post.

    If the indicator is providing a signal plot, that means the plot's previous values can be accessed. The plot will have a value on each bar and will be +1, -1, or 0. Typically it would output a zero when there is no signal and then the +1/-1 when there is a signal.

    So if you check for the previous bar value of the plot is 0 and the plot's current bar value is 1 then you have detected that the indicator has just changed. Likewise, you can check if the previous bar value of the plot was 0 and the current bar value of the plot is -1.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    172 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    88 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    128 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    208 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X