[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Trading Rules Help from Dimitris Tsokakis



PureBytes Links

Trading Reference Links


Joe,
Someone else wrote this code, not me.
Dimitris 
--- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxxx> wrote:
> In one of the routines I collected from the forum, I believe you 
wrote the following AFL attached below . 
> 
> I'm wondering if you would present some details on how you would 
use the LookBack and Shift
> parameters. 
> 
> For example a 20 or 22 day look back would be what is said used by
> the Turtle traders, but what effect does changing the SHIFT 
parameter have? 
> 
> I've used this as an algorithm in a trading strategy and optimized 
the two parameters, 
> but this was brute force approach since I really didn't understand 
the interaction of the two
> parameters and the color coding of the price line. 
> 
> I would appreciate any comments or pointing me to a resource/forum 
email where this was
> discussed. 
> 
> Best regards
> joe landry 
> 
> PS Thanks for all your contributions.  I probably have more DT code 
than any other in my indicator window
> and my InfoSelect AFL database. 
> // For Indicator Window NAME: Break Outs - DT
> 
> // Dimitris Tsokakis 
> 
> // An Indicator Plots a high and low bar and color codes the price 
line for bullish breaks 
> 
> // 
> 
> H0=H;
> 
> L0=L;
> 
> C0=C;
> 
> O0=O;
> 
> Lookback=Param("LookBack",22,10,50,1); // Default for interday 
commodity currency trading
> 
> shift=Param("Shift", 11,1,50,1);                     // ?
> 
> x0=LastValue(Cum(1));
> 
> x1=x0-shift;
> 
> H=Ref(H,-shift+1);
> 
> L=Ref(L,-shift+1);
> 
> H1=LastValue(Ref(HHV(H,Lookback),-1));
> 
> L1=LastValue(Ref(LLV(L,Lookback),-1));
> 
> Plot(H1,"H1",colorYellow);
> 
> Plot(L1,"L1",colorYellow);
> 
> H=H0;L=L0;C=C0;O=O0;
> 
> up=Cross(H,H1) AND Cum(1)>x1;
> 
> dn=Cross(L1,L) AND Cum(1)>x1;
> 
> Plot(C,"Close",IIf(Cum(1)>x1-Lookback AND Cum(1)<=x1,colorBlue,IIf
> 
> (Up,colorBrightGreen,IIf( Dn,colorRed,colorBlack))),64);
> 
> PlotShapes(shapeDownArrow*(Cum(1)==x1+1),colorBlue);
> 
> 
> [Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/