Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget not working as expected

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

    #16
    I've provided you the code. As you can see, should wait 10 bars before ever allowing a profit target. And, as you can see, this is not always the case, as illustrated below by all the targets on the same bar.

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	49.5 KB
ID:	851905

    Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	80.8 KB
ID:	851907


    Mike

    Comment


      #17
      Mike, thanks for posting the code. If you look at the very first entry you notice it will wait for 10 bars before the Set() method is submitted, so it works as expected. To make this work for the other entries, you would need to use unique signal names.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X