need help for email alert on a target and stopLoss - futures io
futures io futures trading



need help for email alert on a target and stopLoss


Discussion in NinjaTrader

Updated
    1. trending_up 1,239 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

need help for email alert on a target and stopLoss

(login for full post details)
  #1 (permalink)
Herkimer NY US
 
Experience: Intermediate
Platform: NT7, CQG
Broker: NT
Trading: ES CL YM
 
Posts: 59 since Jan 2013
Thanks: 10 given, 51 received

Hi Everyone,
how do i add a email alert to a my target and my stop loss when its triggered. i did the entery long and i get the email alert for that, but dont know how to do the other 2. \this is what i have so far. thanks all

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
What blockvolume is visible? - order processing
NinjaTrader
Indicators for pair trading MES and M2K
Platforms and Indicators
Short Interest Ratio indicator?
ThinkOrSwim
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Help Needed: TOS Options Chain IV & IMPL MOVE Calcul …
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
137 thanks
Big Mike in Ecuador
34 thanks
Want your NinjaTrader indicator created, free?
32 thanks
Saturday Morning Market Replay!
20 thanks
Selling Options on Futures?
19 thanks
 
(login for full post details)
  #3 (permalink)
College Point, NY (Queens)
 
 
Posts: 63 since Nov 2009
Thanks: 5 given, 20 received


I think you need to use the OnExecution NT function to access the executions you'll get from fireing the target and/or stop loss functions. You will probably need to set the signal name in the target and stop loss orders so that you can determine in OnExecution which execution it has gotten. You would then put your email alert code in the OnExecution function at the point where you determine which execution you've gotten.

Here is some sample code of mine (the NT manual talks about this also:

private void StopLossSet( IOrder iOrder )
{
...
iExitOrder = ExitLongStop( 0, true, DefaultQuantity, exitPrice, "LongStop", "LongEntry" );
...
}


protected override void OnExecution( IExecution iexecution )
{
...
if ( string.Compare( iexecution.Name, "LongStop" ) == 0 )
{
// do something like send alert.
}
...
}

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Herkimer NY US
 
Experience: Intermediate
Platform: NT7, CQG
Broker: NT
Trading: ES CL YM
 
Posts: 59 since Jan 2013
Thanks: 10 given, 51 received

I did what you said but i keep getting errors message. is this the ony way? and the private is for the variable yes? and the other goes under the onbarstartup too?
Thanks

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
College Point, NY (Queens)
 
 
Posts: 63 since Nov 2009
Thanks: 5 given, 20 received

For stop loss orders, I'm fairly certain that you need to call your code from the OnExecution function (really anytime you want to do something on a fill). The reason being that fills are somewhat asynchronous. I'm not as sure about the target, but I believe so also, because it requires something being done on a fill.

The private function was just my wrapper around the ExitLongStop function. It would be good for you to consult the NT manual pages, especially the OnExecution, EnterLongStop, EnterShortStop, etc pages.

Reply With Quote
The following user says Thank You to kandlekid for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > need help for email alert on a target and stopLoss


Last Updated on March 11, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts