moving from fixed take profit to calculated on some condition

Kiran Chandekar
1367
Kiran Chandekar  

Hi Friends,

I have developed one EA in which I have fixed take profit value say 150 pips.

Now I want to change my take profit based on some condition like close buy order if macd goes in negative.

Another issue is my trade lot size is calculated on % of capital & fixed stoploss.

But I want to calculate my stoploss now on some condition for example buy order stoploss should be close price of last candle minus low of last 5 candles. So this will affect my lotsize calculation also.

Can you explain me what all changes needed to do this .

Thanks

Simon Gniadkowski
17309
Simon Gniadkowski  
kcfve123:

Hi Friends,

I have developed one EA in which I have fixed take profit value say 150 pips.

Now I want to change my take profit based on some condition like close buy order if macd goes in negative.

Another issue is my trade lot size is calculated on % of capital & fixed stoploss.

But I want to calculate my stoploss now on some condition for example buy order stoploss should be close price of last candle minus low of last 5 candles. So this will affect my lotsize calculation also.

Can you explain me what all changes needed to do this .

Calculate your SL and TP based on the conditions you want and use those values instead of the fixed values . . .
Keith Watford
Moderator
26117
Keith Watford  
kcfve123:


But I want to calculate my stoploss now on some condition for example buy order stoploss should be close price of last candle minus low of last 5 candles. So this will affect my lotsize calculation also.



The close price of last candle minus low of last 5 candles would make your SL level very close to zero, I can't imagine that is what you want.