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

Re: [amibroker] Neural Netowrks in AmiBroker



PureBytes Links

Trading Reference Links

Joe,
thank you for your comments.

--- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxxx> wrote:
> Dimitris - Thanks for all your great contributions.   I have quite 
a collection of my favorite indicators and this is sure to be one of 
them.  
> 
> Would a screen on the direction (==43 for Green and up ) and the 
coefficient (FB) for momentum be valid?  

The color of the parabolic is defined in the line
Color=IIf(g,colorRed,colorBrightGreen);
You may change these colors with the ones you prefer.

>Looks like as a coefficient of the equation FB applies to the range 
of the curve?  

The fb is calculated for the bars from the last detected Peak 
[Trough] till the last bar. It has nothing to do with the previous 
history of the stock.

> What changes might one make to make this a regression of a linear 
trendline? 

The regression line is based on a different principle. As already 
stated, when I say best-fit I mean to minimize the abs(parabolic-H) 
[or the respective abs(parabolic-L)]. I do not see any reason to take 
the squares here, abs is just what I need.

> Thanks again
> Joe   
>   ----- Original Message ----- 
>   From: DIMITRIS TSOKAKIS 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, September 02, 2004 4:02 AM
>   Subject: [amibroker] Re: The last best-fit parabolic trendline
> 
> 
>   You may replace now all the LastValue... statements with 
>   SelectedValue... and see the historical parabolics.
>   Dimitris
>   --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx> 
>   wrote:
>   > The following code will decide if the last extreme is a peak or 
a 
>   > trough, will find the best-fit parabola and will plot it on the 
>   price 
>   > chart.
>   > The color will be red/green for descending/ascending parabola.
>   > A red/green arrow marks the last peak/trough.
>   > The parabolic coefficient f has a crude 100-step and then 
another, 
>   > more detailed approximation.
>   > The parabola function p is outside any loop and may be used for 
>   cross 
>   > conditions.
>   > Since it is a best-fit curve, it changes every day, as new data 
are 
>   > imported.
>   > The logic is to engulf the Highs [for the descending curve] and 
the 
>   > Lows [for the ascending curve] with a curvilinear trendline.
>   > 
>   > // The last best-fit parabolic trendline, by D. Tsokakis, 
Sept2004
>   > Plot(C,"C",1,64);
>   > perc=3;//sensitivity calibration
>   > x=BarIndex();xx=LastValue(x);
>   > t1=LastValue(ValueWhen(PeakBars(H,perc)==0,x));
>   > H1=LastValue(ValueWhen(PeakBars(H,perc)==0,H));
>   > t11=LastValue(ValueWhen(TroughBars(L,perc)==0,x));
>   > H11=LastValue(ValueWhen(TroughBars(L,perc)==0,L));
>   > g=t1>t11;
>   > shape=IIf(g,shapeDownArrow*(x==t1),shapeUpArrow*(x==t11));
>   > Color=IIf(g,colorRed,colorBrightGreen);
>   > PlotShapes(shape,color);
>   > t=IIf(g,x-t1,x-t11);
>   > diff1=IIf(g,H1*(xx-t1),H11*(xx-t11));
>   > Lma=LastValue(MA(C,50));
>   > f1=0;f2=IIf(Lma<100,1,0)+3*int(log10(Lma));
>   > fa=0;fb=0;step=f2/100;
>   > for(f=f1;f<f2;f=f+step)
>   > {
>   > parabolic=IIf(g,H1-f*t^2,H11+f*t^2);
>   > S1=LastValue(Sum(abs(parabolic-H),xx-t1));
>   > S11=LastValue(Sum(abs(parabolic-L),xx-t11));
>   > diff=IIf(g,S1,S11);
>   > if(diff<diff1)
>   > {
>   > diff1=diff;fa=f;
>   > }
>   > }
>   > for(f=Max(fa-step,0);f<fa+step;f=f+0.01*step)
>   > {
>   > parabolic=IIf(g,H1-f*t^2,H11+f*t^2);
>   > S1=LastValue(Sum(abs(parabolic-H),xx-t1));
>   > S11=LastValue(Sum(abs(parabolic-L),xx-t11));
>   > diff=IIf(g,S1,S11);
>   > if(diff<diff1)
>   > {
>   > diff1=diff;fb=f;
>   > }
>   > }
>   > p=IIf(g,H1-fb*t^2,H11+fb*t^2);
>   > Plot(IIf(x>Max(t1,t11),p,-1e10),"",color,1);
>   > Title=Name()+", "+WriteIf(t1>t11,"f_desc","f_asc")+"="+WriteVal
>   > (fb,1.4);
> 
> 
> 
>   Check AmiBroker web page at:
>   http://www.amibroker.com/
> 
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> 
>         Yahoo! Groups Sponsor 
>        
>        
> 
> 
> --------------------------------------------------------------------
----------
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>       
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
> [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/