Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Indicator Repainting

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

    Indicator Repainting

    Hi, ive modified a supertrend to make it multi-timeframe, but looks like its repainting and i dont know how to fix it, a little help will be appreciated.

    after a few new candles

    Click image for larger version

Name:	2016-08-15_094004.jpg
Views:	1
Size:	4.1 KB
ID:	905685

    after refreshing (F5)
    Click image for larger version

Name:	2016-08-15_094040.jpg
Views:	1
Size:	3.5 KB
ID:	905684


    file:
    KBT_SPX_V1.zip

    #2
    Hello kabott, and thank you for your question.

    I have reviewed your code and your pictures, and it doesn't look like you have anything that overrides the way Ninja plots and displays charts.

    I am seeing a lot of your plots taking values from a 1 bar ago data series. If you are wondering why your plots do not go all the way up to the current candle, this could be the reason.

    Otherwise could I ask for a little more information on what you would expect to see, as opposed to what you are seeing? Thank you in advance, this information will make it easier to provide better assistance.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica! thanks for your reply, im seeing the indicator brake down after a few candles, im using it with range bars, havent tried it with regular bar types, gonna do that now, anyways the plots show one thing and after refreshing they correct themselves to the way they suppose to behave in the first place

      these r my settings
      Click image for larger version

Name:	2016-08-16_105820.jpg
Views:	1
Size:	114.4 KB
ID:	878907

      Comment


        #4
        Yep, i tried it with 2 minute candles and the same happens, it brakes down with each new candle, until i refresh the chart.. then the process starts again

        before F5
        Click image for larger version

Name:	2.jpg
Views:	1
Size:	45.8 KB
ID:	878908

        after F5
        Click image for larger version

Name:	3.jpg
Views:	1
Size:	47.5 KB
ID:	878909


        the idea is to find the middle of the Supertrend Range (Yellow dotted line) but it repaints and i cant find a reason why, have you updated something recently related to plot drawing? cause i haven't used ninja for a while, probably 6 months or so, so had to update ninja and import everything again, i dont remember the indicator repainting like this before, i would remember, i tested strategies on it, tested it with market replay.. so this is kinda weird
        Last edited by kabott; 08-16-2016, 08:21 AM.

        Comment


          #5
          " am seeing a lot of your plots taking values from a 1 bar ago data series. If you are wondering why your plots do not go all the way up to the current candle, this could be the reason."

          No, i want it to calculate 1 bar behind so it doesn't gives false signals, or in case i configure it to calculate from 60 minute candles while im on a 5 minute chart i wanna see the already established trend.

          Comment


            #6
            To answer your second question directly first, yes, the way indicators refresh and redraw, has been an area under active development. I believe the most recent improvement was #9884 which can be reviewed here, http://ninjatrader.com/support/helpG...s/8_0_0_12.htm .

            If you would like to force an indicator to refresh "on demand" in a way you can control, you can use the ForceRefresh method available here, http://ninjatrader.com/support/helpG...rcerefresh.htm .

            I did notice that all of your logic with the exception of 2 pieces of information drawn to your chart happens when BarsInProgress == 0 . Given this, I would like to recommend, as a debugging step, setting Calculate to CalcuationMode.OnEachTick . If your script behaves the way you would like with this set this way, it means that you may need to modify your multi-timeframe logic so that it works with newer versions of NinjaTrader. This would give you a place to start.

            If this behavior persists through CalculationMode.OnEachTick, or if there are any other questions we may answer, please let us know, and we will be happy to assist further.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Thank you Jessica

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by geddyisodin, Today, 05:20 AM
              0 responses
              3 views
              0 likes
              Last Post geddyisodin  
              Started by JonesJoker, 04-22-2024, 12:23 PM
              6 responses
              33 views
              0 likes
              Last Post JonesJoker  
              Started by GussJ, 03-04-2020, 03:11 PM
              12 responses
              3,239 views
              0 likes
              Last Post Leafcutter  
              Started by AveryFlynn, Today, 04:57 AM
              0 responses
              6 views
              0 likes
              Last Post AveryFlynn  
              Started by RubenCazorla, 08-30-2022, 06:36 AM
              3 responses
              79 views
              0 likes
              Last Post PaulMohn  
              Working...
              X