PureBytes Links
Trading Reference Links
|
The Code...Holy cow how many systems can be puked out in a single day. This
ela file is designed to help all of you filter through the code's code and
find out what the MAEs are.
A. Use the include system statement to include excursion system.
B. Note you will have to rewrite the file append from D:\sysdev\ to the
directory of you choice.
C. Use Excel to open the tex files in spreadsheet format
D. In Excel Use Tools - Data Analysis - Histogram to sort the MAEs into the
bin sizes of you choice
E. Create a table of Bin Size, Winner MAE and Loser MAE
F. Use chart wizard to create graphic that John Sweeny shows in his book
campaign trading.
Look for MFE in the near future.
================System
Excursion======================================================
Vars: MP(0), EP(0), Hi(0), Lo(0), Adverse(0),Control(0), Switch(0);
If Control = 0 Then Begin;
FileAppend("D:\SysDev\maewin.txt", " Entry Date " + " Profit " +
" MAE" + NewLine);
FileAppend("D:\SysDev\maelose.txt", " Entry Date " + " Profit "
+ " MAE" + NewLine);
Control = 1;
End;
MP = MarketPosition;
Adverse = MAE;
If MP=0 and MP[1] <>0 and PositionProfit(1) > 0 Then Begin;
FileAppend("D:\SysDev\maewin.txt"," " + NumToStr(EntryDate(1),0) +
" " + NumToStr(PositionProfit(1),3) + " " +
NumToStr(Adverse[1],3) +NewLine);
End;
If MP = 0 and MP[1] <> 0 and PositionProfit(1) <=0 Then Begin;
FileAppend("D:\SysDev\maelose.txt"," " + NumToStr(EntryDate(1),0) +
" " + NumToStr(PositionProfit(1),3) + " " +
NumToStr(Adverse[1],3) +NewLine);
End;
=============================User Function
MAE=======================================
MP = MarketPosition;
EP = EntryPrice;
If MP <> MP[1] Then Begin
Value99 = 0;
MAE = 0;
Hi = H;
Lo = L;
End;
If MP <> 0 Then Begin
If H > Hi Then Hi = H;
If L < Lo Then Lo = L;
If MP = 1 Then Begin
If Lo - EP < Value99 Then Value99 = Lo - EP;
MAE = Value99;
End;
If MP = -1 Then Begin
If EP - Hi < Value99 Then Value99= EP - Hi;
MAE = Value99;
End;
End;
|