SetTradeDelays( 0, 0, 0, 0 );
Stopprofit=0.0030;
Stoploss=0.0015;
BuyCond = Ref(Cross( MACD(), Signal() ),-1);
SellCond = 0;
ShortCond = Ref(Cross( Signal(), MACD()),-1);
CoverCond = 0;
#include "C:\Program
Files\AmiBroker\Formulas\Include\BuySell.afl"
PlotShapes(shapeUpArrow*Cover,colorBlack,0,L,-15);
PlotShapes(shapeDownArrow*Sell,colorBlack,0,H,-15);
PlotShapes(shapeUpArrow*Buy,colorBlue,0,L,-15);
PlotShapes(shapeDownArrow*Short,colorRed,0,H,-15);
Plot(Close,"Close",IIf( Buy, colorGreen, IIf(Sell , colorRed ,1 )),64);
GraphXSpace=15;
Keeps it clean
and operates on current bar, referencing the cross of previous bar
for
entry. Stops are now ready to trigger. Just me,
but I always set the TradeDelays
to
zero.
--jeff
-----Original
Message-----
From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of Steve
Sent:
Thursday, September 29, 2005 5:06 PM
To:
amibroker@xxxxxxxxxxxxxxx
Subject: Re: [trading] RE: [amibroker]
Bitten the bullet on loops