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

Re: [amibroker] AFL help: Sell = Ref(exremspan (buy,10),-10);



PureBytes Links

Trading Reference Links

Ah,

Goldwing, that helps.
The penny has nearly dropped.

So the arrays would look like this:

Buy = condition;

0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0

Buy = exremspan(buy,6);

0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0

sell = ref( buy , -6 );

0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1

Meaning always sell when the previous buy was 6 days
ago?

Thanks

ChrisB


--- l washington <goldwing01_1999@xxxxxxxxx> wrote:

> same question here.
>
http://finance.groups.yahoo.com/group/amibroker/message/14340
> answer here.
>
http://finance.groups.yahoo.com/group/amibroker/message/14378
> kris45mar <kris45mar@xxxxxxxxx> wrote:
> Hello all:
> 
> I stumbled across this code in the .chm files and
> this
> looks quite helpful. (message 32098)
> 
> Sell=Ref( ExRemSpan( Buy, 10 ) ,-10);
> 
> Could someone explain in English what this is doing?
> 
> I am trying to code for an exit 10 bars after the
> first buy signal (even when there are subsequent buy
> signals) and this seems to be doing what I want. Now
> I
> just need to try and understand what it means.
> 
> See also thread at
> http://www.reefcap.com/ubb/Forum49/HTML/000076.html
> 
> ************
> 
> Buysig = Cross(C , EMA(C,30));
> Sellsig = BarsSince(Buysig) == 10;
> //Buysig = ExRemSpan(Buysig,10);
> //Buysig = ExRem(Buysig, Sellsig); // line #3.
> intrade = Flip(Buysig, Sellsig);
> Buy = Buysig AND Ref(intrade, -1) == 0;
> Sell = Sellsig AND Ref(intrade,-1) ;
> Sell=Ref( ExRemSpan( Buy, 10 ) ,-10);
> 
> Plot(C,"",1,64);
> Plot(EMA(C,30),"",colorBlue,1);
> PlotShapes(shapeUpArrow * Buysig, colorLightBlue, 0
> ,
> L , -10);
> PlotShapes(shapeUpArrow * Buy, colorBlue, 0, L,
> -20);
> PlotShapes(shapeDownArrow * Sellsig, colorPink, 0,
> H,
> -20);
> 
> PlotShapes(shapeDownArrow * Sell, colorRed, 0, H,
> -10);
> Plot(intrade,"intrade", IIf(1,colorGreen,
> colorPink),
> styleHistogram | styleOwnScale);
> 
> ***************
> 
> 
> 
> Any help appreciated
> 
> Regards
> 
> ChrisB
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
>
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> 
> Yahoo! Groups SponsorADVERTISEMENT
> 
> 
> ---------------------------------
> 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 the
> Yahoo! Terms of Service. 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


------------------------ 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/