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

RE: [trading] RE: [amibroker] Bitten the bullet on loops



PureBytes Links

Trading Reference Links

Steve, I think I understand, try;
   
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

Terry & Jeff, thanks very much for your help. I'm still trying to get my head around your code Jeff, but it does look the way to go. Thanks again.
 
 


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





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS