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

Re: [amibroker] Re: Sell IF Today Open > Entry Price



PureBytes Links

Trading Reference Links

you might also add in       Buy=exrem(buy,sell);        to remove
excess buy signals or else the entryprice will continually be updated
and may never be crossed


On Fri, 18 Feb 2005 10:57:31 -0000, Stephane Carrasset
<nenapacwanfr@xxxxxxxxx> wrote:
> 
> 
> try this
> 
> Buy= Cross(O,Ref(O,-1));
> //for(i=0; i<BarCount-1;i++)
> EntryPrice=ValueWhen(Buy,O);
> Plot(C,"Close", colorBlack, styleCandle);
> Sell=Cross(O,Ref(EntryPrice,-1));
> Plot(EntryPrice, "",2,1);
> PlotShapes( Buy * shapeUpArrow, colorGreen,0, L,-10 );
> PlotShapes( Sell *shapeDownArrow , colorRed,0, H,-10 );
> 
> 
> >
> > ES=O>Ref(O,-1);
> > Buy=ES;
> > EntryPrice=ValueWhen(ES,O);
> >
> > Sell=Cross(O,EntryPrice);
> >
> > Stephane, maybe I'm stupid but it doesn't works for me.
> > He don't sell when O cross entryprice.
> >
> > Thank you anyway
> >
> > ---
> > Giuseppe
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset"
> > <nenapacwanfr@xxxx> wrote:
> > >
> > > example
> > >
> > > BuyCond=Cross(MFI(14),50);
> > > //for(i=0; i<BarCount-1;i++)
> > > BuyPr=ValueWhen(BuyCond,C);
> > > Plot(C,"Close", colorBlack, styleCandle);
> > > Buy=Cross(O,BuyPr);
> > > Plot(BuyPr, "",2,1);
> > > PlotShapes( Buy, colorGreen,0, L,-10 );
> > >
> > > >
> > > > I want to sell if today open is greater then last entry price
> > (last
> > > > time I bought)
> > > > BuyPrice is set to Open.
> > > >
> > > > Buy=O>Ref(O,-1);
> > > > EntryPrice=ValueWhen(Buy,BuyPrice,0);
> > > >
> > > > Sell=O>EntryPrice;
> > > >
> > > > Why this formula doesn't works fine?
> > > >
> > > > Thanks
> > > >
> > > > ---
> > > > Giuseppe
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/