Topic: Reverse buy and sell
Where in the the generated EA code line , when a signal is generated to execute an order can i change from a buy to a sell and a sell to a buy?
That way buys become sells, and sells becomes buys.
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Premium Club → Reverse buy and sell
Where in the the generated EA code line , when a signal is generated to execute an order can i change from a buy to a sell and a sell to a buy?
That way buys become sells, and sells becomes buys.
Reverse the logic (losing strategies will still lose).
My intention is not a reverse strategy, but using a combination of hedging and cross multi-currency basket, i am using the ea signals excuted order reverse buy and sell for another purpose in correlation with another EA.
I do not want to reverse the logic, just the orders Buy/Sell while keep the same entry signal . The reverse orders B >S are using more like indicators i just need them represented .
Reverse the logic (losing strategies will still lose).
If an expert executes a short entry instead of a long entry, its logic will fall apart.
You can test it but we do not guarantee any results you may expect.
For MetaTrader 4
Search for bool ActionTrade4::SendOrder
Add 2 lines below it just after the first opening curly bracket:
type=(type==OP_BUY)?OP_SELL:OP_BUY;
For MetaTrader 5
Search for request.type
Change the found line from:
request.type = (type==OP_BUY)?ORDER_TYPE_BUY:ORDER_TYPE_SELL;
To
request.type = (type==OP_BUY)?ORDER_TYPE_SELL:ORDER_TYPE_BUY;
In most cases reversing the logic means reversing the signal, I assume it is not hard for you to mark one bar and check it in both logic cases, whether it works for your strat or not, should take less than 30 seconds...
My intention is not a reverse strategy, but using a combination of hedging and cross multi-currency basket, i am using the ea signals excuted order reverse buy and sell for another purpose in correlation with another EA.
I do not want to reverse the logic, just the orders Buy/Sell while keep the same entry signal . The reverse orders B >S are using more like indicators i just need them represented .
footon wrote:Reverse the logic (losing strategies will still lose).
Thank you Footon and Popov
Forex Software → Premium Club → Reverse buy and sell
Powered by PunBB, supported by Informer Technologies, Inc.