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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      650 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X