Quote below of code found in the "" public yahoo forum - Home Trader Wealth-Lab Tech Forum, from robertmarkaitken ... this "may" be related, just guessing because don't know, could be related to the star, stripes and eagle systems that HT, I believe may have been promoting at one stage.
http://au.groups.yahoo.com/group/HTWLTech/message/10
"Here is my effort at coding the MR Short system - Eagle.
I have plotted all the indicators on the chart so you can see what
is happening and check it. I have also set up the variables for
optimising.
The only thing I havent done is write the simuscript for percentage
risk position sizing.
It backtests very similarly to the results we have been given so I
think I ve got it pretty right. Sone of the gurus might be able to
speed it up a bit though as the chartscript seems to run pretty slow.
Anyway - Im hoping that this will start the ball rolling
Please post any queries, improvements, suggestions etc here so
everyone can benefit from them.
here's the code:
////////////////////////////////////////////////////////////////////
{$I 'HTFunctions'}
// Declare variables for optimising
var Bar: integer;
var FS: float;
Var HigherCloses, ATRlow, ATRhigh, perATRlow, perATRHigh, Turnover,
MaaMult: integer;
//Set up Variables for Optimising
HigherCloses := 5; // 5 = No Consecutive higher closes
ATRlow := 10; // 10 = ATR high period
ATRHigh := 50; // 50 = ATR Low period
perATRlow := 2; // 2 = %ATR high period
perATRHigh := 5; // 5 = %ATR Low period
MaaMult := 2; // 2 = Moving average angle gate
multiplier
Turnover := 30000000; // 30M = Turnover
//Calculate Average Turnover
var SMAVol10, SMAClo10, VolxClo10: integer;
SMAVol10 := SMASeries( #Volume, 10 );
SMAClo10 := SMASeries( #Close, 10 );
VolxClo10 := MultiplySeries( SMAVol10, SMAClo10);
//************************************ Set up Graphs
********************************//
var Gate1, Gate2, Gate3, Gate4, Gate5, Gate6: string;
var Pane1, Pane2, Pane3, Pane4, Pane5, Pane6: integer;
// Written description of gate conditions.
Gate1 := 'Gate1 = 5 consequtive higher closes';
Gate2 := 'Gate2 = TBC';
Gate3 := 'Gate3 = ATR(10) > ATR(50)';
Gate4 := 'Gate4 = Atr(10) > 2 and < 5';
Gate5 := 'Gate5 = TBC';
Gate6 := 'Gate6 = Turnover > $30 Million';
// Set up pane sizes
Pane1 := CreatePane( 20, true, true );
Pane2 := CreatePane( 20, true, true );
Pane3 := CreatePane( 20, true, true );
Pane4 := CreatePane( 20, true, true );
Pane5 := CreatePane( 20, true, true );
Pane6 := CreatePane( 20, true, true );
// Adding titles to graphs
DrawText( Gate1, Pane1, 2, 1, #red, 8 );
DrawText( Gate2, Pane2, 2, 1, #red, 8 );
DrawText( Gate3, Pane3, 2, 1, #red, 8 );
DrawText( Gate4, Pane4, 2, 1, #red, 8 );
DrawText( Gate5, Pane5, 2, 1, #red, 8 );
DrawText( Gate6, Pane6, 2, 1, #red, 8 );
for Bar := 50 to BarCount - 1 do
begin
// Color Markings to visually determine if trigger and gates are
programmed OK
// Gate1 - 5 consecutive higher closes
if Cumup( Bar, #Close, 1 ) >= HigherCloses then
DrawCircle( 4, Pane1, Bar, PriceHigh( Bar ), #blue, #thin );
// Gate2 - HT Displacement
if pricehigh(bar) >HTDisplacementShortUS(Bar, #low, 7 ,25, 3)then
DrawCircle( 4, Pane2, Bar, PriceHigh( Bar ), #blue, #thin );
// Gate3 - Atr(10) > Atr(50)
if atr(bar,ATRlow) > atr(bar,ATRhigh ) then
DrawCircle( 4, Pane3, Bar, PriceHigh( Bar ), #blue, #thin );
// Gate4 - Atr(10) > 2 and < 5
if ( atr(bar,10) / sma(bar,#close,10) ) * 100 > PerATRlow then
if ( atr(bar,10) / sma(bar,#close,10) ) * 100 < perATRhigh then
DrawCircle( 4, Pane4, Bar, PriceHigh( Bar ), #blue, #Thin );
// Gate5 - MAA Gate
if ( SMA(Bar, #Close, 40) <
SMA(Bar-10, #Close, 40) + MaaMult * ATR(bar,40) ) then
DrawCircle( 4, Pane5, Bar, Pricehigh( Bar ), #blue, #Thin );
// Gate6 - Turnover > $30 Million
if (lowest(bar,VolxClo10,50) > Turnover) then
DrawCircle( 4, Pane6, Bar, Pricehigh( Bar ), #blue, #Thin );
end;
// Execute the System
for Bar := 50 to BarCount - 1 do
begin
if not LastPositionActive then
if Cumup( Bar, #Close, 1 ) >= HigherCloses
then // Gate 1
if pricehigh(bar) >HTDisplacementShortUS(Bar, #low, 7 ,25, 3)
then // Gate 2
if atr(bar,ATRlow) > atr(bar,ATRhigh )
then // Gate 3
if ( atr(bar,10) / sma(bar,#close,10) ) * 100 > PerATRlow
then // Gate 4
if ( atr(bar,10) / sma(bar,#close,10) ) * 100 < perATRhigh
then // Gate 4
if ( SMA(Bar, #Close, 40)
< // Gate 5
SMA(Bar-10, #Close, 40) + MaaMult * ATR(bar,40) ) then
if (lowest(bar,VolxClo10,50) > Turnover)
then // Gate 6
// Entry Conditions
if ShortAtlimit(Bar+1,pricehigh(bar)+ 0.5*atr(bar,10),'Limit
entry') then
// calculate Fixed Stop
FS := Priceclose(Bar)+ 6 * ATR(bar,10 );
// Exit Conditions
CoverAtlimit(Bar + 1, pricelow(bar-2),lastposition, 'Limit exit');
CoverAtStop(Bar + 1, FS ,lastposition, 'Fixed stop');
ApplyAutoStops (Bar+1);
End;
////////////////////////////////////////////////////////////////////
"
Hey HT, don't blame me, the sh1t is on the internet, someone would find it sooner than later.