How can I change "buy" to "sell" in an EA?

 

Hello, i have a little problem.

I built an EA with a Expert-Advisor-Builder and I confound the command "Buy" with command "Sell".

So now the EA does the opposite of what i had in mind. If he should buy, he sells and if he should sell he buys.

How can I change "Buy" to "Sell" and "Sell" to "Buy" in the EA-Editor?

 
rabbit_trader:

Hello, i have a little problem.

I built an EA with a Expert-Advisor-Builder and I confound the command "Buy" with command "Sell".

So now the EA does the opposite of what i had in mind. If he should buy, he sells and if he should sell he buys.

How can I change "Buy" to "Sell" and "Sell" to "Buy" in the EA-Editor?

There are a few things to change in the OrderSend() call:

- OP_BUY ---> OP_SELL

- Ask ---> Bid

- Ask-StopLoss*Point ---> Bid+StopLoss*Point

- Ask+TakeProfit*Point ---> Bid-TakeProfit*Point


Post your OrderSend() call and we'll show you.


CB

 
I added a txt-file with the code
Files:
ea.txt  8 kb
Reason: