Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Loads but Doesn't Load on Strategy

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

    Indicator Loads but Doesn't Load on Strategy

    Hi!

    I'm working with the indicator that I requested to be fixed in this thread: https://ninjatrader.com/support/foru...-with-strategy , which NinjaTrader_Kate did (and I'm very grateful for that)

    However, when I try to create a strategy using this indicator, the strategy simply won't work at all. I'm loading it onto MES's 1 minute chart on 1/24 and have the logic attached below for the strategy. As you can see, it's a simple system that only enters a trade if there's a buy signal (buy signal being above 25 in this case only really means that the buy signal is not 0). However, it has failed to generate a single trade on backtest (even though there were dozens of instances of buy signals on MES being >25 throughout the time tested, if the indicator was simply loaded separately). By the way for the sake of verifying that the indicator was the only thing malfunctioning, I created the strategy shown with no other conditions other than what NinjaTrader had.

    Initially, I thought that this error may have occurred due to the opacity's default value being 25, and whenever the indicator was loaded separately, it changed it from 25 to 10, so I simply changed the default opacity in the source code for the indicator from 25 to 10, but that didn't help. I also thought the error might have occurred from the "maximum bars look back" variable in the strategy builder, but changing that from 256 to Infinite made no difference either.

    I would also like to note that despite me hitting "Plot on Chart" in strategy builder, the indicator doesn't Plot, so I believe it has some internal error which results in it not working.
    It's also worth stating that I did check the Log for errors prior to posting, and there were not any.
    Uninstalling the indicator and reinstalling it (believing I might have tampered with it too much) and reloading it again into a new strategy doesn't work either.

    I'm at my wit's end at this point and I'd really appreciate support. Thank you!

    #2
    Hello,

    Thank you for your post.

    I've taken a look at this and what was happening was that when the strategy calls the indicator, the indicator reaches State.DataLoaded before it actually gets added to the chart so the bool that controls whether or not it plots wasn't getting flipped. I've changed this so it will only check if it's on the chart once it's in OnBarUpdate, which should eliminate the issue.

    I've attached both the updated indicator and a test strategy. When you import this, if it asks if you want to update the DivergenceSpotterV2 indicator, say yes so the corrected one gets installed. I'll update this on the App Share as well.

    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    23 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    120 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X