SetChartOptions(1,chartShowDates);
GraphXSpace = 10 ;
Plot(Close, "C", colorBlack, styleCandle);
X = BarIndex();
MA10 = MA(C, 10) ;
MA50 = MA(C, 50);
Plot(MA10, "MA10", colorBlue, styleLine);
Plot(MA50, "MA50", colorRed, styleLine);
Buy = Cross(MA10, MA50);
Sell = Cross(MA50, MA10);
BarBuy = ValueWhen(Buy, X, 1);
BarSell = ValueWhen(Sell, X, 1);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone), colorGreen, 0, L, -12);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorRed, 0, H,
-12);
intrade = IIf( BarBuy > BarSell , 1,
-1);
Title = " " + Name() + " - " + Date() + " - BarBuy = " + BarBuy + " -
BarSell = " + BarSell
+ " - Intrade = " + intrade + " " ;
Is it possible to write an other formula
which works since the beginning of the Array
?
Thank's for your response
__._,_.___
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
__,_._,___