Easylanguage question

How do I tell the system "Don't trade for one day after a trade returning a profit > x" and "No long trades after a short trade returning a profit > x"? Thank you.
 
Use Flags: If PositionProfit >= 0 then Flag = CurrentBar; (Or you can use Flag = Date[0])
After that use logic like: If CurrentBar >= Flag +2 Then ..... Or if Date[0] >= Flag +2 Then ...
Do not forget to reset your flags to "0"

You'll figure it out
Regards,
 
Thank you very much. I am using "positionprofit" as you suggested, but I seem to have found a way to make it work like this, at least as far as my first question is concerned:

PositionProfit(1) < 1000 or (Date - ExitDate(1)) >= 1
 
Quote from travis:

Thank you very much. I am using "positionprofit" as you suggested, but I seem to have found a way to make it work like this, at least as far as my first question is concerned:

PositionProfit(1) < 1000 or (Date - ExitDate(1)) >= 1

Good.
 
I found another way, the other didn't actually work for various reasons (my data is on a 5-min timeframe):

Positionprofit(1) < c * Pr_Profit or barssinceexit(1) > Bars_to_wait
 
Back
Top