int sellticket = trade.Sell(Lots,_Symbol,Bid, NormalizeDouble((Bid + (100 * _Point)),_Digits),NormalizeDouble((Bid -(100 * _Point)),_Digits),NULL);
i use the above code to open sell position but the same code opens buy opositions on a sell order stoploss.
No, it doesn't.
Look elsewhere in the EA code.
It does here is my screenshot
Right click in the history window and click "positions".
You are looking at "orders"
Right click in the history window and click "positions".
You are looking at "orders"
int sellticket = trade.Sell(Lots,_Symbol,Bid, NormalizeDouble((Bid + (100 * _Point)),_Digits),NormalizeDouble((Bid -(100 * _Point)),_Digits),NULL);
The above code also opens buy orders yet it's for opening sell orders
Right click in the history window and click "positions".
.
You are using the strategy tester.
Look in the operations tab.
With Mt5 you don't see a trade open an closed, you see eg. A buy then a sell that closes the Buy trade.
MT4 is a much more user friendly platform for new traders.
Even when i click on the operation tab if can see the buy positions being open this code "int sellticket = trade.Sell(Lots,_Symbol,Bid, NormalizeDouble((Bid + (100 * _Point)),_Digits),NormalizeDouble((Bid -(100 * _Point)),_Digits),NULL); " i expert ir to open only sell positions.
So What i wanna know is that why is code opening also Buy positions
With Mt5 you don't see a trade open and closed, you see eg. A buy then a sell that closes the Buy trade.
MT4 is a much more user friendly platform for new traders.
.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
int sellticket = trade.Sell(Lots,_Symbol,Bid, NormalizeDouble((Bid + (100 * _Point)),_Digits),NormalizeDouble((Bid -(100 * _Point)),_Digits),NULL);
i use the above code to open sell position but the same code opens buy opositions on a sell order stoploss.