How to initialize global variables after Stopp Loss of an Order?
int count=0; for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() ){ // and my pair. count++; // Handle trailing stops } if (!count){ // No open orders this pair
Hello,
I want to ask how to initialize global variables after an Order was executed by the System via Stopp Loss like
Tester: stop loss #1 at
What kind of check is necessary like using OrderMagicNumber or using OrderTotal Method?
Thanks for a code snippet.
Hoschie