Fave This

Wednesday, 5 January 2011

[Komunitas AmiBroker] afl buy sell with ATR



ada ketemu afl di web tetangga spt ini :

priceatbuy=0;

Buy = (HHV(H, 20) == H);

for ( i =0; i < BarCount; i++)
{
Sell[i] = 0;

if(Buy[i] && (BuyPrice[i] > priceatbuy ))
{
priceatbuy = BuyPrice[i];
}

else if (C[i] < (priceatbuy - 2 * 0.45));

{
Sell[i] = 1;
priceatbuy = 0;
}
}
Filter = Buy OR Sell;
OldHhv = Ref( HHV(H, 20), -1 );
AddColumn(Buy, "Buy", 1.0);
AddColumn(BuyPrice, "Buy$", 2.2);
AddColumn( Sell, "Sell", 1.0);
AddColumn( C, "Price", 2.2);
AddColumn( HHV(H,20)," Max High", 2.2 );
AddColumn( OldHhv," Previous High", 2.2 );



else if (C[i] < (priceatbuy - 2 * 0.45)); kalau ini diganti dgn yg bawah kok ngak running

else if (C[i] < (priceatbuy - 2*ATR(20)));

ada yg boleh bantu, trims.

rgds
hb




__._,_.___


Apabila membutuhkan software AmiBroker, Realtime Intraday Data & Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org





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

__,_._,___

No comments:

Post a Comment