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

[amibroker] Re: Comments on Van Tharp courses please



PureBytes Links

Trading Reference Links

Hello,

try this

Buy= Cross(Random(),0.5);// your conditions
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue, 0,Low,-30 );
// all buy signal
Sell=Cross(MFI(3),50);// your conditions

Equity(1,0);
Plot(C,"",1,64);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen, 0,Low,-20 );
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed ,0, High,-20 );


<danielwardadams@xxxx> wrote:
> In my price chart, I want to add arrows at my Buy and Sell points. 
> Both my Buy and Sell criteria contain a bunch of "And" conditions 
> (e.g., Close > Open And .....
> 
> So my arrows appear at my Buy and Sell points but then also appear 
on 
> subsequent days when all the same conditions exist.
> 
> Question: What can I check to know that I'm already holding a 
> position (so I don't put out the arrows again)? I've tried checking 
> both Buyprice and BarsSince != 0 and they don't seem to do what I 
> want. I've also tried using the Cross function in conjuction with 
> BarSince and didn't get what I want.
> 
> As usual, I suspect I'm just making it too hard and an easy 
solution 
> exists.
> 
> TIA,
> Dan



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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 
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/