Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Plot Order Lines Issues

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

    Strategy Plot Order Lines Issues

    Problem

    Order line plots (open position, stoploss) stopped working for no apparent reason.

    Background
    1. Based on NT 7
    2. Strategy is based on the SampleStrategyPlotOrderLines example provided.
    3. Strategy worked OK for a while showing open positions and trailing stops as expected
    4. Then the lines stop showing for no apparent reason

    Debug to date
    After various attempts, I put tracers in the StrategyPlot indicator (which has not been changed in anyway) and reduced the Strategy Plots to 1 (i.e. only 1 call to strategy plot) and found the following:

    • Removed calls to strategy plots in onbarupdate i.e. only had the Add strategy plot in initialize:
      • Get multiple tracers (appears to be one for each candle) was only expecting 1

    • Added the call to strategyplot back into onbarupdate i.e.
      StrategyPlot(id, color).value.set(value)
      • Value.set was being ignored i.e. it plotted what appeared to be Close[0] regardless of the value I provided


    So it appeared that the Value[0] for both the position line and the stoploss line were identical i.e. the Value.Set statements in the calling strategy were being ignored and the lines were plotting on top of each other.


    Any assistance would be greatly appreciated.
    Last edited by cnecorp; 03-13-2016, 12:50 PM.

    #2
    Hello cnecorp,

    Thank you for your post.

    Can you attach your strategy to your response to test on our end? If you prefer, you can send the file to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H - 1482233' in the subject line.

    You can attach your strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your strategy > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

    Comment


      #3
      Hi Patrick
      Thanks for the response. I found a workaround and am not using the strategy plot to monitor my order status.

      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X