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

[amibroker] Re: question



PureBytes Links

Trading Reference Links

Hi Imran,

copy and paste the Code from the first /* to the Last */ in the editor
and choose Apply Indicator.
finish.


Code Start-----------------------------------------------------------
/*______________________________ Plot Title______________ */
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows);
Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
%g, Close %g (%.1f%%)
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) )
)+encodecolor(colorred)+
"\n\n\n\Welcome to amibroker";


/*______________________________ Plot Chart______________ */

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style", styleCandle, maskPrice ) ); 
_SECTION_END();
/*_______________________________Variabelen________________*/
x = EMA(C,5);	
y = EMA(C,30)	;
z = EMA(C,34)	;
/*______________________________Plot lines on Chart________*/

Plot(x, "EMA(34)", colorBlue, styleLine);
Plot(y, "EMA(34)", colorGreen, styleLine);
Plot(z, "EMA(34)", colorRed, styleLine);
/*______________________________Trading Rules_/Conditions___*/
Buy=Cross(x,y);
Sell=Cross(y,x);
/*______________________________Plot Arrows on Chart_______*/
PlotShapes(shapeUpArrow * Buy, colorGreen,0,L,-20);
PlotShapes(shapeDownArrow * Sell, colorRed, 0,H,-20);

/*_____________________________Have FUN___________________*/

Code Ende-----------------------------------------------------------

by,Dieter

--- In amibroker@xxxxxxxxxxxxxxx, "Imran Pishori" <ipishori1@xxxx> wrote:
> Hello,
> 
>  
> 
> I just got Amitrader and was using the program and I realized I have
a LOT
> to learn but am enjoying the learning process thus far.
> 
>  
> 
> I had a question since my coding skills are very limited.
> 
>  
> 
> Let say I had 3 plots for example.
> 
>  
> 
> x = plot ema (close (5)); 
> 
> y = plot ema (close (30));
> 
> z = plot ema (close (34));
> 
>  
> 
> now I wanted to buy when 'x' crosses 'y and z' to the positive (upside):
> 
>  
> 
> eg:
> 
>  Buy = cross (x, ????) // this is the part I don't know what to do with
> 
>  
> 
> And I would like to sell when x crossed 'y and z' to the negative
> (downside):
> 
>  
> 
> Eg:
> 
> Sell = cross (x, ???) // I have no idea what I am doing
> 
>  
> 
> Could anyone please point me in the right direction on how I would
> accomplish this.  The help menu points toward the plots crossing
just one
> point and that is the close price of a particular stock.
> 
>  
> 
> Also, are there any books on coding etc. that one would recommend I
read to
> get a better idea on how to code using Amitrader.  
> 
>  
> 
> THANKS!
> 
>  
> 
> Imran




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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