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

[amibroker] need with buy/sell



PureBytes Links

Trading Reference Links

Can some one from Amibroker help me with this formula?
I'm using back-test with it, and it is showing me I am losing money 
big time.


PlotOHLC(1.1*Open, 1.1*High, 1.1*Low, 1.1*Close, "Price chart shifted 
10% up", colorBlack, styleCandle ); 


Plot(IIf(Month() !=
Ref(Month(),-1),1,0),"",colorYellow,styleHistogram|styleOwnScale);

minimum = LastValue( Lowest( Volume ) );
maximum = LastValue( Highest( Volume ) );
JurikJMA( Prefs( 11 ), Prefs( 12 ), Prefs( 13 ) );
Lw1 = JurikRSX (H,9.1); 
Lw2 = JurikRSX (L,24.9);

Plot (LW1 ,"jurikRSX20 ",colorRed,styleLeftAxisScale| styleLine, 
minimum, maximum ); 
Plot (LW2 ,"JurikRSX30 ",colorBlue,styleLeftAxisScale| styleLine, 
minimum, maximum );

Buy=Cross(Lw1,Lw2);
Sell=Cross(Lw2,Lw1);
Short = Cross( -100 Lw1 );
Cover = Cross( Lw2, -100 );


/* code removes redundant buy/sell signals*/
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes( shapeUpArrow * Buy + shapeDownArrow * Sell, IIf( Buy, 
colorWhite, colorYellow));
range = 0.5 * Ref( H-L, -1 );
targetup = O + range;
 targetdown = O - range;

 Filter = H >= targetup AND L <= targetdown;

 AddColumn( O, "O" );
 AddColumn( H, "H" );
 AddColumn( L, "L" );
 AddColumn( range, "range" );
 AddColumn( targetup, "targetup" );
 AddColumn( targetdown, "targetdown" );




Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/