[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 
 | 
 same question here. 
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 
 
 
  __________________________________________________ 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 Sponsor | 
 
  ADVERTISEMENT
 ![click here]()  |     | 
 
![]()  |  
 
 
 
Yahoo! Groups Links 
 |   
 
 | 
 |   
 
 |