Easylanguage question

Discussion in 'Strategy Development' started by travis, Jan 8, 2004.

  1. travis

    travis

    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.
     
  2. abogdan

    abogdan

    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,
     
  3. travis

    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
     
  4. abogdan

    abogdan

    Good.
     
  5. travis

    travis

    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