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

RE: [amibroker] Re: Awesome Oscillator by Gary Thompson (modified)



PureBytes Links

Trading Reference Links

Larry,

Oops, your right I forgot to qappend it. Here it is.

Don

_SECTION_BEGIN("Awesome WMA Oscillator with Change");

 

/* Awesome Oscillator code for Amibroker

            Written By Gary Thompson

            07th April 2005 . Modified by don Lindberg 04-20-2007 */

 

SetChartOptions(0,chartShowDates|chartShowArrows||chartWrapTitle);

 

T=Param( "Time Period for MA",24,0,1000,1);

KMA=((C-WMA(C,T))/WMA(C,T))*100;

S=Param( "Time Period for SlowMA",15,0,1000,1);

SlowMA=WMA( Close ,S);

F=Param( "Time Period for FastMA",5,0,1000,1);

FastMA=WMA( Close,F);

barcolor= IIf((SlowMA - FastMA) <= Ref(SlowMA - FastMA, -1),colorGreen,colorRed);

Buy=  (SlowMA - FastMA) <= Ref(SlowMA - FastMA, -1)AND V >=10000;

Sell=  (SlowMA - FastMA) >= Ref(SlowMA - FastMA, -1)AND V<=0;

Filter=C>=1 AND C<=50 AND C>WMA(C,T)

AND (SlowMA - FastMA) <= Ref(SlowMA - FastMA, -1)AND V>=100000 ;

Buy = ExRem( Buy, Sell );

Sell = ExRem( Sell, Buy );

PlotShapes( IIf( Buy, shapeDownArrow + shapePositionAbove, shapeNone ), colorGreen );

PlotShapes( IIf( Sell, shapeHollowUpArrow + shapePositionAbove, shapeNone ), colorRed );       

Graph0=FastMA-SlowMA;

Graph0Style=2+5;

Graph0BarColor=barcolor;

 

AddColumn(Close,"Close",1.2);

AddColumn((WMA(C,T)),"WMA",1.2);

//AddColumn ((SlowMA - FastMA) <= Ref(SlowMA - FastMA, -1),"Buy ");

AddColumn (V,"Volume", 1.0);

AddColumn (Buy,"Buy", 1.0);

AddColumn (Sell,"Sell", 1.0);

Score=Filter=C>=1 AND C<=50 AND C>WMA(C,T)

AND (SlowMA - FastMA) <= Ref(SlowMA - FastMA, -1) AND V>=100000;

SetSortColumns(-6);

 

Title="Awesome Zero Lag Oscillator  w/ Buy Sell arrows for "+Name()+" "+Date()+" The Close is "+WriteVal(abs(KMA),format=1.2)+"%"+WriteIf(KMA>0," above"," below")+" the "+T+"  period WMA";

_SECTION_END();

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Larry
Sent: Friday, April 20, 2007 11:12 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Awesome Oscillator by Gary Thompson (modified)

 

Hi Don,

Thank you. Okay, I remarked out the "SetSortColumns." As you said, no
problem.

You also mentioned that you would append below the modified code which has
volumn statements added to it. I can't seem to find it. Did you by
any chance forget to append it?

Could you please check? Thank you.

Regards,

Larry

--- In amibroker@xxxxxxxxxps.com, "Don Lindberg" <dlindber@xx.> wrote:
>
> Larry,
>
> I can't duplicate your problem with the "SetSortColumns" error. All this
> does is sort the exploration automatically after a run on the 6th
column, so
> remarking it out is no big deal.
>
> I don't know what to tell you on the scan issue as I only run it in
Explore
> mode. I added volume statements to the Buy/Sell criteria, but it doesn't
> seem to make a difference in scan mode. I have included the modified
code
> below. Try running again and see if it makes a difference on your system.
>
> Don
>
>
>
> _____
>
> From: amibroker@xxxxxxxxxps.com [mailto:amibroker@xxxxxxxxxps.com] On
Behalf
> Of Larry
> Sent: Friday, April 20, 2007 6:07 AM
> To: amibroker@xxxxxxxxxps.com
> Subject: [amibroker] Awesome Oscillator by Gary Thompson (modified)
>
>
>
> Hi Don,
>
> My reply to you (under the TSI Ergodic thread) has somehow vanished into
> thin air. Anyway, it might be more appropriate if I start a new thread.
>
> Thanks for the AZLO that was modified by you. However, when I tried to
run
> it I got an "error 30 Syntax error" against the following line.
>
> "SetSortColumns(-6);"
>
> The other problem is that as a scanner, it picks up those stocks that
have
> 0 volume and they kind of cluttered up the results page. Is there a way
> to filter out the 0 volume stocks both in the scanner and explore?
>
> Once again thanks for your help.
>
> Regards,
>
> Larry
>
> P.S. I am posting through the Yahoo Groups website and I hope you get to
> read it.
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___