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

Re: [amibroker] Re: Code for AFL on a reversal day. Help required


  • Date: Fri, 25 Dec 2009 10:05:18 -0500
  • From: "Anthony Faragasso" <ajf1111@xxxxxxxx>
  • Subject: Re: [amibroker] Re: Code for AFL on a reversal day. Help required

PureBytes Links

Trading Reference Links



Buy,Sell,Short,Cover added..

 

gapclosingfromupopen =Open > Ref(H,-1) AND C > Ref(L,-1) AND C < Ref(H,-1);

gapclosingfromdownopen=Open < Ref(L,-1) AND C > Ref(L,-1) AND C < Ref(H,-1);

Color= IIf(gapclosingfromupopen,colorYellow,IIf(gapclosingfromdownopen,colorOrange,ParamColor("color",colorBlack)));

PlotShapes(gapclosingfromupopen*shapeDownArrow,colorRed,0,High,-15);

PlotShapes(gapclosingfromdownopen*shapeUpArrow,colorGreen,0,Low,-15);

_SECTION_BEGIN("Price");

SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Plot( C, "Close", color , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

_SECTION_END();

//Buy,Sell,Short,cover

//Note: In AA settings ** General > Positions ** set to long and short

SetTradeDelays( 0, 0, 0, 0 );//overrides delay setting in AA window

Buy=Ref(gapclosingfromdownopen,-1);

BuyPrice=Open;

Sell=Ref(gapclosingfromdownopen,-1);

SellPrice=Close;

Short=Ref(gapclosingfromupopen,-1);

ShortPrice=Open;

Cover=Ref(gapclosingfromupopen,-1);

CoverPrice=Close;

//////////////////////////////////////

Filter= gapclosingfromupopen OR gapclosingfromdownopen;

AddColumn(C,"");

AddColumn(gapclosingfromupopen,"up");

AddColumn(gapclosingfromdownOpen,"down");



__._,_.___


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

__,_._,___