I want to ask your help with a problem i have,
I build an ea who is only trading short i am done setting my take profit.
but i need to set my stop loss at exact the same distance to the bid as the take profit
So here is an example :
Sell order : actual price is 100
Take profit is : 80
Stop loss need to be : 120
Hope i explained it well,
Thanks in advance Piet.
Whatever your TP, calculate the difference between the TP and the entry price. SL will be entry price + the difference.
Once you have set your SL, then calculates your TP
if the SL is a iHighest, then TP will be TP= Bid- (iHighest - Bid); // (plus or minus the spread (?) )
Inject that to your order :
OrderSend( ........, SL, TP, ,... );
To add comments, please log in or register