TURTLE TRADING MT4 indicator conversion to prorealtime

Forums ProRealTime English forum ProBuilder support TURTLE TRADING MT4 indicator conversion to prorealtime

Viewing 7 posts - 1 through 7 (of 7 total)
  • #108622

    Original Turtle Rules:

    To trade exactly like the turtles did, you need to set up two indicators representing the main and the failsafe system.

    • Set up the main indicator with TradePeriod = 20 and StopPeriod = 10 (A.k.a S1)
    • Set up the failsafe indicator with TradePeriod = 55 and StopPeriod = 20 using a different color. (A.k.a S2)

    The entry strategy using S1 is as follows

    • Buy 20-day breakouts using S1 only if last signaled trade was a loss.
    • Sell 20-day breakouts using S1 only if last signaled trade was a loss.
    • If last signaled trade by S1 was a win, you shouldn’t trade -Irregardless of the direction or if you traded last signal it or not-

    The entry strategy using S2 is as follows:

    • Buy 55-day breakouts only if you ignored last S1 signal and the market is rallying without you
    • Sell 55-day breakouts only if you ignored last S1 signal and the market is pluging without you

    The turtles had a progressive position sizing approach that boosted their winnings. Once a trading decision has been made you should…

    • Enter the market with 2% risk. Place stop-loss 2ATR from the opening price.
    • If the position moves in your favor 1/2ATR, enter the market again with 2% risk and trail all stop-losses 2ATR from current price.
    • If the position moves in your favor 1/2ATR, enter the market again with 2% risk and trail all stop-losses 2ATR from current price.
    • If the position moves in your favor 1/2ATR, enter the market again with 2% risk and trail all stop-losses 2ATR from current price.
    • Stop adding to positions when 4 positions have been taken. (*** And see money management rule below)

    The exit strategy is performed using the dotted line of the indicator:

    • Exit longs taken using S1 when price action closes below a 10-day low
    • Exit shorts taken using S1 when price action closes above a 10-day high
    • Exit longs taken using S2 when price action closes below a 20-day low
    • Exit shorts taken using S2 when price action closes avove a 20-day high

    The turtles had very strict money management too. Initial position risk was 2%, but it decreased according to the current drawdown.

    • If the account had a 10% drawdown, the risk for each trade should decrease a 20%
    • If the account had a 20% drawdown, the risk for each trade should decrease a 40%.
    • If the account had a 30% drawdown, the risk for each trade should decrease a 60%.
    • So, if the account had a N% drawdown, the risk for each trade should decrease N*2%.

    Can this be converted to PROREALCODE.

    Thank you in advance

     

    #108648

    So you want the indicator code you provided to be translated for ProRealTime?

    #108654

    Hi Nicolas,

    Yes, i am using it on my Metatrader platform, and I tried my hand at coding it but with no success, so I am turning to you guys to translate it correctly to ProRealTime.

    Thank you.

     

    #108669

    Here it is:

     

    #108692

    Hi Nicolas

    Thank you so much. Have a wonderful week-end.

    Regards

    Banie

    #114378

    Hello Nicolas

    I have a question about your code. I do not understand the following code. Why do you write the following or clause: or (HIGH > rhigh and Strict =1). What I not understand, in this code strict is always 0, it will never go to 1. Why do we need this clause: or (HIGH > rhigh and Strict =1).

    If it is possible, could you explain me the following parameter, please?

    I assume variable TrendDirection is undefined, when I start the Indicator. How is this code working:

    If TrendDirection[1] <> 1 then

    TrendDirection = 1

    endif

    Thanks for your effort and help.

     

    #114379

    Strict is just a setting that you can set to zero or 1 to turn off or on whether the strategy applies the strict version of the turtle rules or a looser version. The strict version includes consideration of the high and low compared to the Tradeperiod donchian channel when deciding trend direction.

    Variables in ProRealCode do not need to be declared and all variables are assumed to be zero until given a different value. So at the close of the first bar of a chart TrendDirection will be zero and so an initial trend direction of 1 or -1 will be set but after that it will just flip between 1 or -1 depending what conditions are met.

    2 users thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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