Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

mailing alert messages

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

    #16
    HI Patrick,

    I'm having issues trying to use the OnExecution Method. However given I run simple strategies, hadling only 1 entry per instrument couldn't I use something like this:
    Code:
    if(CrossAbove(EMA(50), EMA(100), 1)) { EnterLong(); SendMail("[email protected]", "[email protected]", "Trade Alert", "Long Entry at"+Position.AvgPrice); }
    It appears to work, the only issue I currently have, is that the prices I am sent via email don't reflect the last entry. should I solve this by using FIFO for position avg. price calculations' at Tools-->Options-->General-tab?

    Comment


      #17
      Hello sburtt,

      Thank you for your post.

      The incorrect price is due to the fact the EnterLong() has not even been processed yet before you send out an e-mail.

      This is why OnExecution() in important, so that you send the e-mail out when the order is filled.

      Please let me know if you are still running into items with OnExecution().

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      110 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      59 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      37 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      41 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      78 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X