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

RE: [AmiBroker] buy/sell arrows



PureBytes Links

Trading Reference Links

Mike,

 

Just add the following code to the very bottom of your AFL and it will work.  Make sure in Parameters you have Show Trading Arrows set to Yes.

Buy = ExRem( Buy, Sell );

Sell = ExRem( Sell, Buy );

PlotShapes(Buy*shapeUpArrow,5);

PlotShapes(Sell*shapeDownArrow,4);

 

Ill warn you in advance, even with the ExRem statements this code generates a LOT of arrows.  Maybe Tomasz knows how to tighten up the code.

 

Don Lindberg

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of mikedostal24
Sent: Thursday, July 05, 2007 7:43 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] buy/sell arrows

 

Hello,
Tomasz provided code for the July issue of Technical Analysis of
Stock & Commodities magazine along with a picture of a chart. In the
picture there are buy/sell arrows which don't seem to be in the code.
I am wondering how I would plot this - do I need to write a seperate
code to plot the arrows as seperate overlay? Below is the code
Any help is appreciated.
Thanks in advance!
mike

// Volume Price Confirmation Indicator (VCPI) CODE
// volume weighted MA
function VWMA( array, period )
{
return Sum( array * V, period ) / Sum( V, period );
}
// Volume Price Confirmation Indicator
function VPCI( speriod, Lperiod )
{
Vw = VWMA( C, lperiod );
Vpc = Vw - MA( C, lperiod );

Vpr = VWMA( C, speriod ) / MA( C, speriod );
Vm = MA( V, speriod ) / MA( V, Lperiod );
return Vpc * Vpr * Vm;
}

// plot VPCI
speriod = Param("Short period", 5, 1, 50, 1 );
lperiod = Param("Long period", 20, 1, 100, 1 );
Vp = VPCI( speriod, Lperiod );
Plot( Vp, "VPCI"+ _PARAM_VALUES(), colorRed );

// and VPCI smoothed
aperiod = Param("Smoothing period", 20, 1, 30, 1 );
Vps = MA( Vp, aperiod);
Plot( Vps, "MA("+aperiod+")", colorBlue );

// simple trading system follows
Buy = Vp > Vps AND
ADX( 7 ) > 10 AND
MACD( 12, 26 ) > Signal( 12, 26, 9 );
Sell = Vps < Vp;

__._,_.___

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

__,_._,___