Here's the code. But remember... Turtle trading can't be done completely with codes. There's a lot more to do than what is down here but it does make the process easier. Code is written by me so use all you like:
Variable: ATR(0), Acct(0), MaxAcct(0), DDown(0), Risk(0), Risk2(0), Contr(0);
ATR = AvgTrueRange(15);
Acct = 100000 + NetProfit; {This is the account size you want to put in}
If Acct > MaxAcct then MaxAcct = Acct;
If MaxAcct > 1 then DDown = Acct / MaxAcct;
Risk = Acct * .02;{Per trade risk by Decimal}
Risk2 = Risk;
{Risk of Ruin}
If DDown <= 0.9 and DDown > 0.8 then Risk2 = Risk2 * 0.8;
If DDown <= 0.8 and DDown > 0.7 then Risk2 = Risk2 * 0.64;
If DDown <= 0.7 and DDown > 0.75 then Risk2 = Risk2 * 0.5;
If DDown <= 0.75 and DDown > 0.6 then Risk2 = Risk2 * 0.4;
If DDown <= 0.6 and DDown > 0.5 then Risk2 = Risk2 * 0.32;
If DDown <= 0.5 then Begin;
Alert("Busted!!");
Risk2 = 0;
End;
Contr = Risk2 / ((2 * ATR) * BigPointValue);
{Entry}
Variable: PLFactor(-1), InitContr(0), InitATR(0), LongFS(-1), ShortFS(-1);
Condition1 = CurrentBar > 0 and High > HighestFC(High, 20)[1];
Condition2 = CurrentBar > 0 and Low < LowestFC(Low, 20)[1];
If PositionProfit > 0 then PLFactor = 1;
If PositionProfit < 0 then PLFactor = -1;
If MarketPosition <= 0 and Condition1 and LongFS = -1 Then Begin;
If PLFactor = -1 then Begin;
Buy("L-Entry") Contr Contracts at Close + 1 Point Stop;
InitContr = Contr;
InitATR = ATR;
ShortFS = -1;
End;
If PLFactor = 1 then Begin;
ShortFS = -1;
LongFS = 1;
PLFactor = -1;
End;
End;
If MarketPosition >= 0 and Condition2 and ShortFS = -1 Then Begin;
If PLFactor = -1 then Begin;
Sell("S-Entry") Contr Contracts at Close - 1 Point Stop;
InitContr = Contr;
InitATR = ATR;
LongFS = -1;
End;
If PLFactor = 1 then Begin;
LongFS = -1;
ShortFS = 1;
PLFactor = -1;
End;
End;
Condition8 = CurrentBar > 0 and High > HighestFC(High, 50)[1];
Condition9 = CurrentBar > 0 and Low < LowestFC(Low, 50)[1];
If MarketPosition <= 0 and LongFS = 1 and Condition8 then Begin;
Buy("L-Entry-FS") Contr Contracts at Close + 1 Point Stop;
InitContr = Contr;
InitATR = ATR;
LongFS = -1;
End;
If MarketPosition >= 0 and ShortFS = 1 and Condition9 then Begin;;
Sell("S-Entry-FS") Contr Contracts at Close - 1 Point Stop;
InitContr = Contr;
InitATR = ATR;
ShortFS = -1;
End;
{Pyramid}
Condition3 = MarketPosition = 1 and CurrentBar > 0 and High > Highest(High, 50)[1];
Condition4 = Marketposition = -1 and CurrentBar > 0 and Low < Lowest(Low, 50)[1];
Condition5 = ATR < (InitATR * 6);
Condition6 = CurrentEntries <= 1;
Condition7 = OpenPositionProfit >= (CurrentEntries * (InitATR * 0.5) * BigPointValue);
If Condition4 and Condition5 and Condition6 and Condition7 then Begin;
If Contr < InitContr then Sell("S-Pyramid") Contr Contracts at EntryPrice(0) - ((InitATR * 0.5)-1 Point) Stop
Else Sell("S-Pyramid.") InitContr Contracts at EntryPrice(1) - ((InitATR * 0.5)- 1 Point) Stop;
End;}
{Stops}
Variable

yraCont(0);
If CurrentEntries > 0 then PyraCont = CurrentContracts / CurrentEntries;
If CurrentEntries = 1 then ExitLong("2 ATR EL") at EntryPrice(0) - (InitATR * 2) Stop;
If CurrentEntries = 1 then ExitShort("2 ATR ES") at EntryPrice(0) + (InitATR * 2) Stop;
If Low < LowestFC(Low, 10)[1] then ExitLong("Rev BrkOut EL") at Close - 1 Point Stop;
If High > HighestFC(High, 10)[1] then ExitShort("Rev BrkOut ES") at Close + 1 Point Stop;
ExitLong("RangeStop EL") LowestFC(Low, 10) - 1 Point Stop;
ExitShort("RangeStop ES") Highest(High, 10) + 1 Point Stop;
If CurrentEntries <= 1 and OpenPositionProfit < 0 and BarsSinceEntry(0) >= 10 then ExitLong("10 day EL") at Open;
If CurrentEntries <= 1 and OpenPositionProfit < 0 and BarsSinceEntry(0) >= 10 then ExitShort("10 day ES") at Open;