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 Belfortbucks, Today, 09:29 PM
      0 responses
      1 view
      0 likes
      Last Post Belfortbucks  
      Started by zstheorist, Today, 07:52 PM
      0 responses
      7 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      150 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Working...
      X