double Ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);
Forum on trading, automated trading systems and testing trading strategies
Please EDIT your post and use the SRC button when you post code.
Thank you I edited it
As long as it places those many orders just after the condition is met, then you should add return(0) or just return after the ordersend function
to stop opening more orders. Also, you need to show the code in some way (depends on the method you use) that the condition is met or a new bar
is opened, or, ...
Showing the code is the only way to solve such problem.
Thank Osama. I have attached the code where exactly should I place return (0)
Check out the example code on this page under the heading "Putting It All Together."
Specifically, you probably want to use this line to see if a position already exists and act accordingly.
Thank you let me try that