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 TraderBCL, Today, 04:38 AM
        2 responses
        17 views
        0 likes
        Last Post TraderBCL  
        Started by martin70, 03-24-2023, 04:58 AM
        14 responses
        106 views
        0 likes
        Last Post martin70  
        Started by Radano, 06-10-2021, 01:40 AM
        19 responses
        609 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        6 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        471 views
        0 likes
        Last Post tradingnasdaqprueba  
        Working...
        X