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 argusthome, Yesterday, 10:06 AM
      0 responses
      20 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      18 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      14 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      9 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      38 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X