Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Suggestion: Recalculate indicators when chart style changes

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

    Suggestion: Recalculate indicators when chart style changes

    I have an indicator that colors data bars based on specific criteria. The indicator is sensitive to the chart style, as candles must be hollow or filled to distinguish up candles from down candles, while bars are always a solid color. This works fine when the indicator is initially applied, but there can be problems if the chart style changes. Note the three screen shots below.

    The first shows the result when a bar chart was created and then the indicator was applied. This is correct.

    The second shows the result after the chart style was changed from OHLC to Candlestick. This is incorrect, as all candles are filled; there's no way to distinguish up candles from down candles.

    The third shows the result after the Indicators window was opened and then immediately closed by clicking OK. The indicator recalculated and detected the new chart style, so now the candles are colored properly.

    Hence my suggestion, as this problem would not occur if indicators were recalculated when the chart style changed.
    Attached Files

    #2
    Thanks for the suggestions Mike, we'll add to our list - would you see the correct outcome if you pressed F5 to reload the NinjaScript's applied?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Yes, F5 takes care of it. But it would be nice if that weren't necessary.

      The ship that has probably sailed at this point was making BarColor be the interior of a candle. If you had BarColor as the candle outline and something like CandleInteriorColor for the inside, there'd be a much smoother transition between bars and candles. But I suspect it's too late now....

      Comment


        #4
        I see, thanks for clarifying matters Mike.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WeyldFalcon, 12-10-2020, 06:48 PM
        14 responses
        1,426 views
        0 likes
        Last Post Handclap0241  
        Started by Barry Milan, Today, 10:35 PM
        0 responses
        3 views
        0 likes
        Last Post Barry Milan  
        Started by DJ888, Yesterday, 06:09 PM
        2 responses
        9 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        40 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Today, 08:51 AM
        2 responses
        16 views
        0 likes
        Last Post bill2023  
        Working...
        X