calculating stop loss

11
2015.03.26 01:47

Hey,

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,

Moderator
9640
2015.03.26 03:09
Do it the same way as you have set the TP except SL will be higher than the entry price
11
2015.03.26 07:34
GumRai:
Do it the same way as you have set the TP except SL will be higher than the entry price

Is set the take profit with an iLowest statement but i dont want the stop loss to be iHighest but on the same distance As the take profit line
Moderator
9640
2015.03.26 07:53
pietp:

Is set the take profit with an iLowest statement but i dont want the stop loss to be iHighest but on the same distance As the take profit line

Whatever your TP, calculate the difference between the TP and the entry price. SL will be entry price + the difference.

1046
2015.03.26 08:32

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, ,...  );

11
2015.03.26 08:48
ffoorr: