College Point, NY (Queens)
Posts: 63 since Nov 2009
Thanks Given: 5
Thanks Received: 20
|
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.
|