ET News & Sponsor Info
General Topics
Markets
Technical Topics
Brokerage Firms
Company Specific
Tools of the Trade
Trading for a Living
Community Lounge
Site Support

# Anyone has the Turtle Trading formula in MS Excel

Discussion in 'Trading' started by andrasnm, Nov 11, 2002.

1. ### andrasnm

If you do - could you email it to me or post it here?
I am not an Excel expert - I have started to create it but I have
ran out of time.

2. ### Corso482

What's this turtle trading formula I've heard mentioned before? Is this the same turtle thing refered to in Market Wizards?

3. ### andrasnm

It is a money management formula. I have the code (it was posted here too) so the search would tell you where...
Also weath lab has some turtle systems. I wonder if I could get a copy of the VB code for MS Excel? I can't code in VB and my schedule is crazy now. Two jobs, a 2 year old a web-site and no money to hire someone.

The system(not quite complete in Easy Language) is as below;
___________________________________________________
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;

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}

VariableyraCont(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;

5. ### limitdown

uh, this looks outstanding...

what do you do with it?, in terms of trading?

is this a decision before entering trades methodology?

is this a management of trades methodology?

6. ### TSaimotoGuest

Hey, It's my written code!!!

ah well... I gave it out to the public anyways...

It's nice to know it's helping people!

Woo HOo.....!!!!

7. ### TSaimotoGuest

I just noticed that you're the guy who wrote the E-book with the virus inside! (I wasted 2 hours to get rid of the virus with all the scans and computer maintenance!!! ARRRGGGHHH!!!)

Didn't you have the book by Russell Sands like 7 years ago? Are you going to include the Excel in the E-book package?

Well, none of my business...

ET IS FREE FOR TRADERS BECAUSE OF THE FINANCIAL SUPPORT FROM THESE SPONSORS: