Breakeven code modification

Forums ProRealTime English forum ProOrder support Breakeven code modification

Viewing 4 posts - 1 through 4 (of 4 total)
  • #63076

    Hi all,

    I have been playing with the standard breakeven trailing from Prorealcode, and I have been creating different levels to be more accurate and take better advantage of the positive side of the operation. I noticed that the breakeven was at 20 pips, but the operation moved to 80 pips to later close in 20pips.  It is pretty much the same than Nicolas’ MFE trailing, but just changing the names 🙂

    In any case, something is missing since I noticed that it does not work as it supposes. Probably, something is missing, so I am posting the code below an attaching a pic of an example, with the hope that anyone will identify the mistake.

    I am also attaching a pic of an example that is driving me crazy. Short operation and the close of the candle reaches 16,8 pips, which it should activate the STOP order in tradeprice(1)-12pipsize. Something is missing and I don’t see it because it touches the SL=30.

    Thanks, good trading and profitable week,

    Juan

     

    #63078

    Correction: When I said the close of the candle reaches 16,8 pips, I meant trade price(1)-close=16,8 pips. Once the operation opens in the middle of the candle  until the close of the short candle=16,8 pips. It should activate the breakevenlevel with pointstokeep4.

    #144303

    Long time post, and you might already know the answer as you are a master now…. At least you can confirm/infirm whether I am correct in my findings.

    Personally, I tend to use the Method B below as long as I can, and Method A as an alternate if I cannot use the B one.

    Anyway, looking into how PRT works I think that any position is taken at the close of the current bar (for EXITSTOP / SELL), and not while you are in the current candle (evaluation of IF breakevenlevel>0 THEN…).

    So what you what to do is

    A/ either add he other way is use multiple time frames (TF), a  TF  to control your entries (as you sue it on your graph), and one TF way shorter to control your exits, the difficulty being that :

    A1/ Your longest timeframe need to be multiple of your shorter one.

    A2/ The display of your graph needs to be in the shortest timeframe.

    That is probably the easiest solution for a custom trailing but cannot avoid some high volatility bars (anyway, even a STOP order would not ensure you sell at the precise exit point if there is some sudden peak in volatility).

    B/ If doable: Define a stop point before entering the next candle (that is calculating the exit point in advance for the next bar, as the current one completes, it is also know at as a reverse engineering of an indicator (for example, it is very easy to set for a normal moving average, by it can become more complicated for some indicators like exponential moving average RSI, MACD, and so on).

    #144306

    Typo “(as you sue it on your graph)”, should be “(as you use on your graph)”,

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login