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

Re: [amibroker] trade enter price.



PureBytes Links

Trading Reference Links

this code will help,
 
regds,Ed
 
 
waitPeriod = 10;
ema1 =
EMA(C,15
);
ema2 =
EMA(C,45
);

signalBar =
Cross
(ema1,ema2);
valueSignalBar =
ValueWhen(signalBar,H+0.1,1
);

Buy = Cross(H, valueSignalBar) && BarsSince
(signalBar) < waitPeriod;
BuyPrice = Max(O
,valueSignalBar);

SetChartOptions(0, chartShowDates
);
Plot(C,"Last=",colorBlack,64
);
Plot(valueSignalBar,"valueSignalbar",colorWhite,styleDashed
);
Plot(EMA1,"ema1",colorYellow,1
);
Plot(EMA2,"ema2",colorBlue,1
);

PlotShapes(IIf(signalBar,shapeSmallCircle,shapeNone),colorWhite,0,L,-15
);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,-15
);
PlotShapes(IIf(Buy,shapeHollowUpArrow,shapeNone),colorWhite,0,L,-15
);
PlotShapes(IIf(Buy,shapeHollowSmallCircle,shapeNone),colorWhite,0,BuyPrice,0);
 
 
 
 
----- Original Message -----
Sent: Tuesday, February 24, 2009 5:08 PM
Subject: [amibroker] trade enter price.

I am new to amibroker and hoping someone could help me with this.
 
if have a simple formula to buy when 15 ema crosses 45.
 
is the buy price the opening of the next bar following  the signal bar?
 
If i want to set the buy price at 10 cents above the high of the signal bar, how would I do that?
 
can anyone help me with the formula?
 
thanks in advance
 



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___