calculating stop loss

Back to topics list To post a new topic, please log in or register
avatar
3
pietp 2015.03.26 02:47
 

Hey,

 

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. 

 

 

avatar
Moderator
3407
GumRai 2015.03.26 04:09 #
 
Do it the same way as you have set the TP except SL will be higher than the entry price
avatar
3
pietp 2015.03.26 08: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
avatar
Moderator
3407
GumRai 2015.03.26 08: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. 

avatar
250
ffoorr 2015.03.26 09:32 #
 

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


avatar
3
pietp 2015.03.26 09:48 #
 
ffoorr:

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


Thanks for your tip my TP is An variable ILowest iTS An close short condition i use the option or (||) to set my SL and TP so i gonna try SL is : (Bid +(lowest  variabele - bid)) 
Thx hope it works


Back to topics list  

To add comments, please log in or register