PureBytes Links
Trading Reference Links
|
<x-html><HTML>
<TT>Folks,</TT><TT></TT>
<P><TT>I have been asked how I evaluated the SimpleS&P behavior using</TT>
<BR><TT>5 minute charts.</TT><TT></TT>
<P><TT>The following code (also in attached .ela file) is what
was used.</TT><TT></TT>
<P><TT>This is not a perfect system at all and was just a quick attempt
to</TT>
<BR><TT>evaluate an idea. It does solve some problems about a single</TT>
<BR><TT>entry per day and exiting on last bar and initialization on first
bar</TT>
<BR><TT>of day.</TT><TT></TT>
<P><TT>Hope you can use it!</TT>
<BR><TT></TT> <TT></TT>
<P><TT>{</TT>
<BR><TT>=======================</TT>
<BR><TT>ATR system for S&P500</TT><TT></TT>
<P><TT>BUY at close + ((Average(Truerange[1],10))/2)</TT><TT></TT>
<P><TT>We don't know whether he intended ATR of whatever</TT>
<BR><TT>bars you are trading or of daily bars. It really</TT>
<BR><TT>makes good sense to use DAILY bars.</TT><TT></TT>
<P><TT>Sell at close - ((Average(Truerange[1],10))/2)</TT><TT></TT>
<P><TT>$1000 money management stop</TT>
<BR><TT>$1000 Trailing stop</TT>
<BR><TT>Exit all trades on close</TT><TT></TT>
<P><TT>To exit trades on close we must specify the closing</TT>
<BR><TT>time for the market.</TT>
<BR><TT>}</TT><TT></TT>
<P><TT>Inputs: RangMul(.5),</TT>
<BR><TT> DaysRng(14),</TT>
<BR><TT> DolDown(1000),</TT>
<BR><TT> DolBack(2000),</TT>
<BR><TT> UseCond(True);</TT><TT></TT>
<P><TT>Vars: MaxDown(DolDown/BigPointValue),</TT>
<BR><TT> RangAvg(HighD(1)-LowD(1)),</TT>
<BR><TT> RAlpha(2/(1+DaysRng)),RBeta(1-RAlpha),</TT>
<BR><TT> MaxPulb(DolBack/BigPointValue),</TT>
<BR><TT> HHigh(H),</TT>
<BR><TT> LLow(L);</TT><TT></TT>
<P><TT>{Initialization at beginning of day}</TT>
<BR><TT>If date>date[1] then begin</TT>
<BR><TT> Value1=0; {Must be zero to trade -- allow
only 1 trade}</TT>
<BR><TT> RangAvg=RangAvg*RBeta+(HighD(1)-LowD(1))*RAlpha; {XSmo
of Range}</TT>
<BR><TT> HHigh=H; LLow=L;</TT>
<BR><TT>End;</TT>
<BR><TT>If H>HHigh then HHigh=H;</TT>
<BR><TT>If L<LLow then LLow =L;</TT><TT></TT>
<P><TT> {Set whatever conditions desired as setup for trade which</TT>
<BR><TT> must exit at opening of day}</TT><TT></TT>
<P><TT>If UseCond then begin</TT>
<BR><TT> Condition1=O<C[1]; {Go long if Open below
prior day Close}</TT>
<BR><TT> Condition2=O>C[1]; {Go short if Open abpve prior day
Close}</TT>
<BR><TT>End</TT>
<BR><TT>Else begin</TT>
<BR><TT> Condition1=True;</TT>
<BR><TT> Condition2=True;</TT>
<BR><TT>End;</TT><TT></TT>
<P><TT>{Money management stop & Trailing Stop on bars after first!}</TT>
<BR><TT>{Setup current highest high and lowest lows for trail stop}</TT>
<BR><TT>If EntryPrice>0 then begin</TT>
<BR><TT> If MaxDown>0 then begin</TT>
<BR><TT> ExitShort ("mmss") at EntryPrice+MaxDown stop;</TT>
<BR><TT> ExitLong ("mmsl") at EntryPrice-MaxDown stop;</TT>
<BR><TT> End;</TT>
<BR><TT> If MaxPulB>0 then begin</TT>
<BR><TT> ExitShort ("trss") at LLow
+MaxPulB stop;</TT>
<BR><TT> ExitLong ("trsl") at HHigh
-MaxPulB stop;</TT>
<BR><TT> End;</TT>
<BR><TT>End;</TT><TT></TT>
<P><TT>{For first & only trade buy/sell at selected point re close}</TT>
<BR><TT>If Value1=0 then begin</TT>
<BR><TT> If Condition1 then Buy ("opnl") at CloseD(1)+(RangAvg*RangMul)
stop;</TT>
<BR><TT> If Condition2 then Sell ("opns") at CloseD(1)-(RangAvg*RangMul)
stop;</TT>
<BR><TT>End;</TT><TT></TT>
<P><TT>{Exit at end of first session}</TT>
<BR><TT>If time>=Sess1EndTime then begin</TT>
<BR><TT> ExitShort ("clos");</TT>
<BR><TT> ExitLong ("clol");</TT>
<BR><TT>End;</TT><TT></TT>
<P><TT>{Set flag for single trade}</TT>
<BR><TT>If EntryPrice>0 then Value1=Time;</TT>
<BR><TT></TT>
<BR><TT></TT> <TT></TT>
<P><TT>MRLYNNG@xxxxxxx wrote:</TT>
<BLOCKQUOTE TYPE=CITE><TT>In a message dated 97-11-25 19:00:01 EST, you
write:</TT>
<BR><TT></TT> </BLOCKQUOTE>
<TT>--</TT>
<BR><TT>Clyde Lee Chairman/CEO email: <clydelee@xxxxxxx></TT>
<BR><TT>SYTECH Corporation
Work: (713) 783-9540</TT>
<BR><TT> 7910 Westglen, Suite 105 Fax: (713) 783-1092</TT>
<BR><TT> Houston, TX 77063</TT>
<BR><TT> </TT></HTML>
</x-html>
Attachment Converted: "c:\eudora\attach\Simplesp.ela"
|