PureBytes Links
Trading Reference Links
|
fRIENDS
I saw code for trade station named chick goslin trigger line
Can any kind person convert it to code for amibroker?please
---------------------------------
code for ts
------------------------------
{ Chick Goslin Trigger Line
www.tradestationworld.com/discussions/Topic.aspx?Topic_ID=25839}
inputs: Price( Close ), Length1( 3 ),Length2( 10 ),LengthAll( 16 ),
Displace( 0 ) ;
variables: AvgOne(0), AvgTwo(0);
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
AvgOne=AverageFC( Price, Length1 );
AvgTwo=AverageFC( Price, Length2 );
Plot1[Displace]( AverageFC( AvgOne-AvgTwo, LengthAll ), "ML" ,
yellow, default) ;
Plot2[Displace] ((AvgOne-AvgTwo), "SL", red,default ) ;
Plot3(0, "Zero", white, default);
end ;
{ AverageFC: Returns simple average of values over Length bars
(fastcalc) }
inputs:
Price( numericseries ),
Length( numericsimple ) ; { this input is assumed to be a
constant >= 1; will get
divide-by-zero error if Length = 0 }
AverageFC = SummationFC( Price, Length ) / Length ;
{ Summation FC: Returns the summation of values over Length bars
(fast calc) }
{ Summation, fast calculation (series function) }
inputs:
Price( numericseries ),
Length( numericsimple ) ; { this input is assumed to be
constant }
variables:
Sum( 0 ) ;
if CurrentBar = 1 then
begin
for Value1 = 0 to Length - 1
begin
Sum = Sum + Price[Value1] ;
end ;
end
else
Sum = Sum[1] + Price - Price[Length] ;
SummationFC = Sum ;
-------------------------------------------------
Many thanks in advance.
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|