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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      102 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      144 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      71 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X