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

Re: [amibroker] AFL Help



PureBytes Links

Trading Reference Links

Dear sir,
i also want to draw the bottom line and top line in the candle...of 12'o Clock one hour  candle..in automatic while 5 min chart...going time...pls help how..to or check other peoples...

Thank U
Manikandan.MS
projectmani@xxxxxxxxx
09366661978
Tamilnadu
India

--- On Thu, 24/7/08, Debdulal Bhattacharyya <sdebu_2k@xxxxxxxxx> wrote:
From: Debdulal Bhattacharyya <sdebu_2k@xxxxxxxxx>
Subject: [amibroker] AFL Help
To: amibroker@xxxxxxxxxxxxxxx
Date: Thursday, 24 July, 2008, 8:56 PM

hi,
I need help for writing afl.
i need buy signal in intraday chart when price closes abv. previous
day high and once it occurs then next buy level would be highest
high value after last buy and so on.
I started to write this as below

H1= TimeFrameGetPrice( "H", inDaily, -1 );
L1=TimeFrameGetPric e( "L", inDaily, -1 );
C1=TimeFrameGetPric e( "C", inDaily, -1 );

up= H1;
down=L1;
B1=Cross(C,up) AND TimeNum()>=101500;
S1=Cross(down, C) AND TimeNum()>=101500;

//timenum()is used for avoiding buy sell levels before 10.15 AM

// this part is for calculating next levels
up1=HighestSince( B1,H);
down1=LowestSince( S1,L);

B2=Cross(C,up1) AND TimeNum()>=101500;
S2=Cross(down1, C) AND TimeNum()>=101500;

//Generating Signals

Buy=B1 OR B2;
Sell=S1 OR S2;
Buy = ExRemSpan( Buy, 3 );
Sell = ExRemSpan( Sell,3 );

// For Exploration and Scanning and Arrow Display
Signalshape= Buy*shapeUpArrow + Sell*shapeDownArrow ;
pos = 1*ATR(50);
pos1 = 2.5*ATR(50);
PlotShapes( Signalshape, IIf( Buy, colorGreen, colorRed ),0, IIf(
Buy, Low-pos, High+pos ),0 );
//PlotShapes( (shapeSmallCircl e *Buy ,colorBrightGreen, 0,L,5)

for( i = 0; i < BarCount; i++ ) {
if( Buy[i] ) PlotText( "@ Buy : " +"\n"+ up[i], i, Low[i] -
pos1[i], colorGreen );
if( Sell[i] ) PlotText( "@ Sell : " +"\n"+ down[i], i, H[i] +
pos1[i], colorRed );
};

============ ========= ========= ========= ========= ========= ========= ==
But it is not working properly. Every time its putting arrow after
price crosses the previous high.
I think I have to arrest up and down variables after first buy sell
signal of the particular day and for the next time onwards teh
values would be new high and low.

Please help
Debdulal
Kolkata
India



Share files, take polls, and make new friends - all under one roof. Click here. __._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




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

__,_._,___