Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

if x && x not allowed in indicators?

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

    if x && x not allowed in indicators?

    Hello

    i wanted to make a BarColor change when the Momentum goes down,
    it works but only if i have one condition, the second i add another conditions for example a Low [0] <= Low [1]
    the bar colors dont get changed:

    protected override void OnBarUpdate()
    {
    Value.Set(CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, Period)]);



    if (Value[0] >= 0
    && Low [0] <= Low [1]
    && Value[1] >= Value[0]
    )
    {
    BarColor = Color.Red;
    }

    What i am making wrong here, or is it only possible in strategies to have a && command in the if section?

    #2
    Please see here: http://www.ninjatrader-support.com/v...ead.php?t=3170

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X