Turtle Trading System

Discussion in 'Technical Analysis' started by j2ee, Aug 30, 2012.

  1. i know there is money management - i was only giving him the entry/exit signals
     
    #21     Sep 3, 2012
  2. j2ee

    j2ee

    One of the real turtles really come to this forum, can you appear?
     
    #22     Sep 4, 2012
  3. j2ee

    j2ee

    Does this code represent the true turtle trading system?

    // ATR/Turtle Script by Andrew Senft
    //
    // Backtester Options
    SetOption("AllowSameBarExit", False);
    SetOption("MaxOpenPositions", 4);
    PositionSize = - 25;

    // Optimization numbers
    ATRPeriod = Optimize("ATRPeriod", 15, 10, 50, 5);
    BuyThreshold = Optimize("BuyThreshold", .3, .1, .50, .05);
    BuySlope = Optimize("BuySlope", 1.08, 1.05, 1.10, .01);
    SellThreshold = Optimize("SellThreshold", .15, .1, .50, .05);
    ProfitPercent = Optimize("ProfitPercent", 25, 25, 35, 5);

    // Buy/Sell signals and prices
    Buy = Ref(ATR(ATRPeriod), - 1) < BuyThreshold AND
    Ref(Close, - 1) > Ref(Close, - 1 * ATRPeriod / 2) AND
    Ref(Close, - 1 * ATRPeriod / 2) > Ref(Close, - 1 * ATRPeriod) AND
    Ref(Close, - 1) / Ref(Close, - 1 * ATRPeriod) > BuySlope AND
    Ref(MA(Volume, 20), - 1) > 3000 AND// 300,000 volume or more
    Ref(Close, - 1) >= 2; // stocks over $2BuyPrice = Open;

    BeginATR = Ref(ValueWhen(Buy, ATR(ATRPeriod), 1), - 1);
    FilterBeginATR = ValueWhen(Buy, ATR(ATRPeriod), 1);
    Sell = Ref(ATR(ATRPeriod), - 1) > BeginATR + SellThreshold;
    SellPrice = Open;
    Buy = ExRem(Buy, Sell);
    Sell = ExRem(Sell, Buy);

    PositionScore = 100-Ref(ATR(ATRPeriod), - 1);
    ApplyStop(stopTypeProfit, stopModePercent, ProfitPercent, True, 0);
     
    #23     Sep 5, 2012