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

Re: [amibroker] Please help in my formula



PureBytes Links

Trading Reference Links



Hi - You can shift the arrays to the left by using Ref with a positive number...
 
CPctOne = ref( CPct0, 1 );
CPctTen = ref( CPct0, 10 );
PlotShapes( IIF( CPctOne...
PlotShapes( IIF( CPctTen...
 
Steve
 
----- Original Message -----
Sent: Saturday, August 29, 2009 8:34 PM
Subject: [amibroker] Please help in my formula

Can anyone please help me?

I have the following formula:

Plot (C, "Close", colorBlue, styleThick, Null, Null, 0);
CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
PlotShapes( IIf( CPct0 >= 4, shapeHollowUpArrow, shapeNone ) , colorPaleGreen );
PlotShapes( IIf( CPct0 <= -4 , shapeHollowDownArrow, shapeNone ) , colorGold );

This gives me arrows after my condition of CPct0 >= 4 or CPct0 <= -4 is met.

What should I change so that I get TWO arrows - the first arrow one bar before my condition is met, and the second arrow 10 bars before my condition is met.

Thanks, and regards,

Vinay Gakkhar



__._,_.___


**** 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/





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

__,_._,___