Fave This

Monday, 27 June 2011

RE: [Komunitas AmiBroker] PrepToBuy problem



PAK WISNU :

2. Kalau anda hanya ingin masuk SEKALI di awal (less hectic), gunakan tambahan line: PrepToBuy=ExRem(PrepToBuy,Sell); - artinya signal preparasi, hanya akan AKTIF satu kali. Ketemu SELL, baru aktif lagi, sekali. Begitu seterusnya. PrepToBuy nya harus punya kondisi yang persis sama dengan BUY - cuma kurang beberapa tick, supaya tidak mengundang masalah baru (misal muncul PrepToBuy tapi di market buruk yang tidak akan terkonversi jadi BUY anyway, disini jadi masalah).

 

 

HUSNI :

 

Nah ini yg saya cari  selama ini, utak atik AFL kok gak nemu2, malah kemaren didiskusikan di milis masih belum solved juga . Thanks Pak Wisnu, atas pencerahannya ….

Kepada teman2 yg lain ,agar PrepToBuy nya gak hilang, simpan PrepToBuy=ExRem(PrepToBuy,Sell);  di BAGIAN PALING AKHIR AFL kita.

 

Kalau saya tempatkan PrepToBuy=ExRem(PrepToBuy,Sell);  di bawah PrepToBuy = XXX

 

 

Kalau saya tempatkan PrepToBuy=ExRem(PrepToBuy,Sell);  di bagian paling bawah AFL

 

 

 

Ini contoh  AFL lengkap untuk menghilangkan PrepToBuy yg sebelumnya sdh ada sinyal Buy

 

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

PrepToBuy=(C<=UF AND C>=(UF-ZoneTick)) ;

PrepToSell=(C>=DF AND C<=(DF+ZoneTick));

 

// Mengurangi kemunculan PrepToBuy dan PrepToSell yg tdk perlu

BuySellBar = Flip( Buy , Sell );

 

sejakbeli = BarsSince (Buy);

sejakjual = BarsSince (Sell);

 

TerakhirBeli = sejakjual > sejakbeli;

TerakhirJual = sejakbeli > sejakjual;

 

PrepBuy = PrepToBuy AND TerakhirJual ;

PrepSell = PrepToSell AND TerakhirBeli ;

 

Filter=Buy OR Sell OR PrepBuy OR PrepSell AND V > 5000 ;

 

ColorTxt=     IIf(Buy, colorYellow,

                     IIf(Sell, colorYellow,

                     IIf(PrepToBuy, colorBlack,

                     IIf(PrepToSell, colorBlack, colorWhite))));

 

ColorBack=    IIf(Buy, colorGreen,

                     IIf(Sell, colorRed,

                     IIf(PrepToBuy, colorAqua,

                     IIf(PrepToSell, colorOrange, colorWhite))));

 

AddTextColumn(WriteIf(Buy, "Buy!",

                           WriteIf(Sell, "Sell!",

                           WriteIf(PrepBuy, "PrepToBuy",

                           WriteIf(PrepSell, "PrepToSell", "")))),

                           "Trade Signal", 1.0, ColorTxt, ColorBack);

AddColumn(RSI(), "RSI", 1.2);

AddColumn( XXX );

XXX

XXX

PrepToBuy=ExRem(PrepToBuy,Sell);

PrepToSell=ExRem(PrepToSell,Buy);

SetSortColumns(3,-4);

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

 

 

Semoga bermanfaat dan salam belajar,

 

 

Husni

 



__._,_.___


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