Lmt Forex Formula Download


Antarmuka AmiBroker Auto-Trading untuk Pialang Interaktif 1.3.8 Beta Baca Saya 29 Mei 2014 21:03 INI ADALAH VERSI BETA PERANGKAT LUNAK (lihat bagian FAQ untuk jawaban quotwhy apakah itu ditandai sebagai BETA quot) PERDAGANGAN OTOMATIS MEMBAWA RISIKO TERTENTU. SILAKAN TEST DENGAN SEKSAMA KODE ANDA MENGGUNAKAN DEMO DEMO PERTAMA DAN KEMUDIAN PERDAGANGAN PERDAGANGAN REKENING TRANSPORTASI OTOMATIS DIMAKSUDKAN UNTUK MEMBUAT PERDAGANGAN LEBIH CEPAT DAN LEBIH CEPAT TAPI TIDAK DIMAKSUDKAN UNTUK BERJALAN TANPA PENGAWASAN. DONT TINGGAL PERDAGANGAN OTOMATIS TIDAK TERTENTU SEBAGAI RINGKASAN TERTENTU MUNGKIN SEPERTI KEGAGALAN INTERNET, KEGAGALAN DAYA, SITUASI TIDAK TERTENTU YANG MUNGKIN TERHADAP KERUGIAN KEUANGAN SERIUS. Jalankan saja installer dan ikuti instruksinya. Lihat PERUBAHAN LOG di bawah ini untuk daftar perubahan terperinci. AmiBroker 4,70 atau lebih tinggi. Fitur AmiBroker 5.30 terutama pada Vista dan Windows 7. TWS workstation (DEMO, PaperTrading tidak apa-apa) dari interactivebrokers. Versi pilihan: 907 atau lebih tinggi. JANGAN gunakan versi TWS 945.1 - ini adalah buggy, terutama versi web. IB Controller (BrokerIB. EXE) adalah aplikasi terpisah yang bertindak sebagai penyangga antara AmiBroker dan Interactive Brokers TWS. Ia menerima perintah dari AmiBroker dan mengirim perintah untuk mengambil informasi dari TWS. Hal ini juga memungkinkan untuk membatalkan pengiriman perintah secara manual. Aplikasi kontroler IB dijalankan secara otomatis oleh AmiBroker jika rumusnya berisi panggilan berikut: Setelah panggilan ini, aplikasi BrokerIB. EXE (IB Controller) diluncurkan dan variabel ibc berisi pointer ke objek otomasi OLE yang memiliki beberapa metode (fungsi) yang Memungkinkan untuk menetapkan ulang pesanan pesanan melalui TWS dan untuk informasi portofolio permintaan. Metode (fungsi) tersebut disebut metode objek otomasi, misalnya: if (ibc. IsConnected ()) memeriksa apakah koneksi ke IB berhasil menjadi ibc. PlaceOrder (quotMSFTquot, quotBUYquot, 100, quotMKTquot, 0, 0, quotDAYquot, False ) Tempatkan pesanan tapi jangan kirimkan. Perhatikan bahwa ini adalah antarmuka tingkat rendah untuk pengguna tingkat lanjut yang tersedia dalam fase yang disebut salah satu penerapan perdagangan otomatis via IB. Akan ada antarmuka tingkat tinggi yang akan diimplementasikan nanti. Metode Controller IB (Fungsi): Fungsi ini menempatkan orde baru Fungsi mengembalikan OrderId (string) yang nantinya dapat digunakan untuk memodifikasi status penundaan pesanan Parameter: Ticker - string yang menentukan simbol kontrak keamanan yang akan dibeli. Simbol harus mengikuti simbologi yang didefinisikan secara rinci di: amibrokerib. html Tindakan - menentukan tindakan yang akan dilakukan, nilai yang mungkin adalah: quotBUYquot, quotSELLquot, quotSSHORTquot Quantity - jumlah kontrak saham untuk membeli Tipe - menentukan jenis pesanan, nilai yang mungkin adalah: quotMKTquot , QuotMKTCLSquot, quotLMTquot, quotPLMTCLSquot, quotPPLMTquot, quotRPquot, quotTrottquot, quotVWAPquot - baca dokumentasi Broker Interaktif TWS untuk informasi lebih lanjut tentang jenis pesanan LimitPrice - ini mendefinisikan batas harga untuk limit dan stop limit orders StopPrice - ini mendefinisikan stop Harga untuk stop order TimeInForce - menentukan waktu yang berlaku untuk order, nilai yang mungkin adalah: quotDAYquot, quotGTCquot, quotIOCquot, quotGTDquot Mulai dari v1.0.8 field TimeInForce di PlaceOrderModifyOrder menerima spesifikasi GTD dan GAT GTD - Good Till Date - menunjukkan bahwa pesanan Harus tetap bekerja sampai waktu dan tanggal ditetapkan. Spesifikasi Till Date yang baik GTD YYYYMMDD HH: MM: SS TZONE dimana: YYYY adalah 4 digit tahun MM adalah 2 digit bulan DD adalah 2 digit hari HH adalah 2 digit jam MM adalah 2 digit menit SS adalah 2 digit second (OPTIONAL) TZONE adalah waktu Zona (OPTIONAL) Setelah spesifikasi TimeInForce reguler (DAY, GTC, GTD) Anda dapat menambahkan bagian ekstra GoodAfterTime (GAT). Bagian GAT datang SETELAH titik koma. Hal ini menunjukkan bahwa perdagangan harus diserahkan setelah tanggal dan waktu ditetapkan: DAYGAT YYYYMMDD HH: MM: SS TZONE - pesanan hari berlaku setelah waktu yang ditentukan GTCGAT YYYYMMDD HH: MM: SS TZONE - bagus sampai pesanan dibatalkan berlaku setelah waktu yang ditentukan GTD yyyymmdd hh: Mm: ss tzoneGAT YYYYYMMDD HH: MM: SS TZONE - Perintah GTD berlaku setelah waktu yang ditentukan dimana: YYYY adalah 4 digit tahun MM adalah 2 digit bulan DD adalah 2 digit hari HH adalah 2 digit jam MM adalah 2 digit menit SS adalah 2 digit second (OPTIONAL) TZONE adalah zona waktu (OPTIONAL) Catatan: TIDAK boleh ada spasi yang disisipkan di antara titik koma dan string GAT. Ibc. PlaceOrder (MSFT. BUY 100. LMT 27. 0. DAYGAT 20051214 18:00:00 GMT) Benar) - batas hari baik setelah 14 Desember 2005, 18:00 GMT ibc. PlaceOrder (MSFT. BUY. 100. LMT 27. 0. GTD 20051215 17:00:00 GMTGAT 20051214 18:00:00 GMT Benar) - batas pesanan berlaku mulai 14 Desember 2005 18:00 sampai 15 Desember 2005 17:00 GMT ibc. PlaceOrder Benar) - limit order berlaku mulai 15 Desember 2005 19:00 GMT Tanda transmit - boolean yang menentukan apakah pesanan yang diberikan harus Sebenarnya ditransmisikan ke bursa. Jika flag ini diset ke FALSE maka order TIDAK ditransmisikan namun muncul di workstation TWS sehingga Anda dapat menekannya secara manual untuk parameter tambahan untuk IBController 1.0.4 atau lebih tinggi: TickSize - mendefinisikan fluktuasi harga minimum yang diperbolehkan untuk simbol yang diberikan yang dinyatakan dalam pips (0.0001 ). Untuk sebagian besar saham AS adalah 100 (mewakili 0,01 pindahkan), untuk sebagian besar mata uang: 1 (mewakili 0.0001 pindahkan), jika pergerakan minimum kurang dari 0,0001 Anda dapat menggunakan nilai pecahan misalnya 1100 untuk parameter 0.000001 move. additional untuk IBController 1.0.8 Atau lebih tinggi: Atribut - adalah string yang memungkinkan untuk menentukan atribut pesanan tambahan (daftar dipisahkan koma).outsideRTH - jika ditentukan berarti pesanan akan memicu tidak hanya selama Jam Perdagangan Reguler (RTH), tetapi juga dalam perdagangan diperpanjang (pasar awal) ini Berlaku untuk menghentikan pesanan, perintah bersyarat, dan peringatan itu digunakan oleh logika pemicu. Jika tidak ditentukan (salah) perintah akan memicu HANYA selama RTH. AllOrNone - isi semua atau tidak sama sekali eTradeOnly - perdagangan dengan kutipan elektronik hanya firmQuoteOnly - perdagangan dengan kutipan tegas hanya Versi 1.1 ignoreRth rthOnly flags adalah OBSOLETE sekarang dan tidak didukung karena TWS API menjatuhkan dukungan untuk itu. Secara default semua flag tersebut INACTIVE (OFF) Contoh: ibc. PlaceOrder (MSFT, BUY, 1000. LMT 27. 0. GTD 20051215 19:00:00 GMT True 100. allOrNone) (Perhatikan bahwa parameter opsional TickSize MUST Ditentukan jika Anda ingin menggunakan Atribut) ParentID - adalah string yang menentukan pengenal pesanan dari orang tua (dikembalikan oleh panggilan PlaceOrder sebelumnya) yang memungkinkan Anda menempatkan pesanan BRACKET. ParentID ibc. PlaceOrder (MSFT BUY 1000. LMT 27. 0. GTC Salah) ibc. PlaceOrder (MSFT SELL 1000. LMT 28. 0. GTC Salah 100. parentID) ibc. PlaceOrder ( ParentID) Perhatikan bahwa bendera TRANSMIT diatur ke FALSE pada semua perintah braket kecuali yang terakhir. Hal ini memastikan agar pesanan menunggu sampai set order braket selesai. Menyetel bendera Transmit ke TRUE pada transmisi terakhir seluruh braket. OCAGroup - parameter string opsional (baru di 1.1.0) yang memungkinkan untuk menentukan kelompok pesanan OCA (One-Cancels-All) pesanan Perintah grup OCA bekerja bersamaan satu sama lain sehingga ketika satu pesanan dalam grup dieksekusi, sisa pesanan dibatalkan . Untuk info lebih lanjut, lihat: interactivebrokersphpwebhelpMakingTradesCreateOrderTypesoca. htmContoh: ibc. PlaceOrder (MSFT. SELL 1000. LMT 28. 0. GTC True 100. 0. MYGROUP) ibc. PlaceOrder (MSFT. SELL 1000. STP. 26. Parameter numerik opsional (baru di 1.1.0) yang memungkinkan untuk mengontrol cara pesanan OCAGroup ditangani saat satu pesanan dalam kelompok terisi sebagian. Nilai yang mungkin adalah: 1 CANCELWITHBLOCK - perintah lainnya dibatalkan 2 REDUCEWITHBLOCK - pesanan lainnya dikurangi dalam ukuran dan proteksi overfill ON 3 REDUCENONBLOCK - pesanan lainnya dikurangi dalam ukuran dan proteksi overfill OFF Nilai default adalah 3 FAParams - parameter string opsional (baru Di 1.1.0) - untuk digunakan dengan akun FA (Financial Advisor alias FamilyampFriends). Memungkinkan untuk menentukan kelompok alokasi, profil, metode dan persentase akun FA. Keempat parameter ini harus disediakan sebagai string terpisah setengah koma: quotFAGroupFAProfileFAMethodFAPercentagequot. Jika beberapa parameter tidak diperlukan maka boleh dibiarkan kosong tapi Anda harus menyimpan titik koma jika ada parameter lebih lanjut yang diperlukan. Misalnya untuk menentukan urutan yang menggunakan grup quotAllquot dan menggunakan metode quotEqualQuantityquot, FAParameter akan terlihat seperti ini: quotAllEqualQuantityquot: ibc. PlaceOrder (MSFT. BUY 1000. LMT 27. 0. GTC True 100. 0. 0. 0. AllEqualQuantity) Jika Anda ingin menggunakan profil alokasi khusus yang dapat Anda gunakan: ibc. PlaceOrder (MSFT. BUY 1000. LMT 27. 0. GTC True 100. 0. 0. AllMyCustomProfile) Jika FAParams tidak disediakan dan Anda menggunakan akun FA daripada IBc akan menggunakan alokasi default quotAllAvailableEquityquot Perhatikan bahwa secara default IB Controller masuk ke akun quotAllquot yang merupakan kuota, yaitu memegang jumlah semua posisi pada semua sub-akun. Parameter parameter akun - akun (baru di 1.3.5) - untuk penggunaan dengan akun FA (Financial Advisor alias FamilyampFriends). Hal ini memungkinkan untuk menentukan akun tujuan untuk memesan akun IB FampFFA dalam satu panggilan, alih-alih mengandalkan urutan SetAccountPlaceOrder. Single-call PlaceOrderModifyOrder dengan spesifikasi akun memungkinkan untuk menentukan akun tanpa khawatir threadsprocesses lain dapat mengalihkan akun antara SetAccount () dan PlaceOrder (). ModifyOrder (string OrderId, string Ticker, string Action, jumlah Quantity, string Type, nomor LimitPrice, nomor StopPrice, string TimeInForce bool Transmit, nomor opsional TickSize 100, opsional string Attributes quotquot, string opsional ParentID quotquot, opsional string OCAGroup. Fungsi ini memodifikasi urutan yang telah ditempatkan sebelumnya namun belum terisi. Fungsi ini bisa digunakan juga untuk memodifikasi perintah yang dikirim dengan bendera quotTransmitquot yang diset ke False. Juga ketika parameter OrderID kosong, fungsi ini bekerja persis seperti PlaceOrder (sehingga Anda dapat menempatkan dan memodifikasi pesanan menggunakan fungsi ModifyOrder () saja) Fungsi mengembalikan OrderId (string) yang nantinya dapat digunakan untuk mengubah status permintaan pesanan Parameter: OrderId - String yang menentukan orderID untuk dimodifikasi (dikembalikan oleh panggilan PlaceOrder atau ModifyOrder sebelumnya). Jika parameter ini kosong maka fungsi tersebut menempatkan orde baru semua parameter yang tersisa sama seperti pada fungsi PlaceOrder. Pada versi 1.1.0 satu peningkatan ditambahkan ke fungsi ModifyOrder bahwa jika beberapa parameter opsional seperti ParentID, OCAGroup, OCAType, FAParam adalah Tidak ditentukan - maka menggunakan nilai yang diberikan sebelumnya (selama PlaceOrder). Hal ini mencegah dari misalnya kehilangan ParentID saat memanggil ModifyOrder pada pesanan anak tanpa mengatur parentID. Fungsi ini membatalkan pending order. Benar - jika pesanan tertunda ditemukan dan membatalkan permintaan telah dikirim, Salah - jika tidak ada pesanan yang tertunda dengan Parameter OrderId yang ditentukan: OrderId - string yang menentukan orderID untuk dimodifikasi (dikembalikan oleh panggilan PlaceOrder atau ModifyOrder sebelumnya). GetAccountValue (string FieldName) Fungsi ini mengambil nilai akun. String mewakili nilai. Perhatikan bahwa jika Anda memerlukan nomor di AFL Anda harus menggunakan fungsi konversi StrToNum yang akan mengubah string yang dikembalikan oleh fungsi ini ke nomor tersebut. String kosong dikembalikan jika bidang tidak ada atau kosong. Parameter: FieldName - menentukan nilai ke kueri Daftar bidang yang tersedia (case sensitive): 1. Bidang yang bebas mata uang atau dinyatakan dalam mata uang akun BASE (biasanya total): AccountCode AccountReady AccountType AccruedCash CashBalance Currency DayTradeRemaining DayTradeRemainingT1 DayTradesRemainingT2 DayTradesRemainingT3 DayTradesRemainingT4 ExchangeRate FuturesPNL Leverage-S LookAheadNextChange NetLiquidationByCurrency OptionMarketValue PNL RealizedPnL StockMarketValue TotalCashBalance UnrealizedPnL 2. Bidang yang disediakan secara terpisah untuk SETIAP mata uang yang tersimpan di akun, CUR dalam daftar di bawah ini berarti simbol mata uang, jadi untuk dana dan dana dalam denominasi USD Anda akan melihat awalan USD. Perhatikan posisi Forex spot IDEALPRO yang termasuk dalam CURCashBalance di sini. CURAccruedCash CURAccruedCash-C CURAccruedCash-S CURAvailableFunds CURAvailableFunds-C CURAvailableFunds-S CURBuyingPower CURCashBalance CURCurrency CUREquityWithLoanValue CUREquityWithLoanValue-C CUREquityWithLoanValue-S CURExcessLiquidity CURExcessLiquidity-C CURExcessLiquidity-S CURFullAvailableFunds CURFullAvailableFunds-C CURFullAvailableFunds-S CURFullExcessLiquidity CURFullExcessLiquidity-C CURFullExcessLiquidity-S CURFullInitMarginReq CURFullInitMarginReq-C CURFullInitMarginReq - S CURFullMaintMarginReq CURFullMaintMarginReq-C CURFullMaintMarginReq-S CURFutureOptionValue CURFuturesPNL CURGrossPositionValue CURGrossPositionValue-S CURInitMarginReq CURInitMarginReq-C CURInitMarginReq-S CURLeverage-S CURLookAheadAvailableFunds CURLookAheadAvailableFunds-C CURLookAheadAvailableFunds-S CURLookAheadExcessLiquidity CURLookAheadExcessLiquidity-C CURLookAheadExcessLiquidity-S CURLookAheadInitMarginReq CURLookAheadInitMarginReq-C CURLookAheadInitMarginReq-S CURLookAheadMaintMarginReq Curlo okAheadMaintMarginReq-C CURLookAheadMaintMarginReq-S CURLookAheadNextChange CURMaintMarginReq CURMaintMarginReq-C CURMaintMarginReq-S CURNetLiquidation CURNetLiquidationByCurrency CURNetLiquidation-C CURNetLiquidation-S CURPreviousDayEquityWithLoanValue CURPreviousDayEquityWithLoanValue-S CUROptionMarketValue CUROptionMarketValue CURRealizedPnL CURSMA CURSMA-S CURStockMarketValue CURTotalCashBalance CURTotalCashValue CURTotalCashValue-C CURTotalCashValue-S CURUnalteredInitMarginReq CURUnalteredMaintMarginReq CURUnrealizedPnL Ketika mata uang TIDAK ditentukan IBC pertama-tama mencari nilai yang ditentukan dalam mata uang BASE dan jika tidak ditemukan maka gunakan USD sebagai default, sehingga Anda dapat menggunakan GetAccountValue (dan dengan nama lama) GetAccountValue (quotAvailableFundsquot) dan akan kembali sama dengan GetAccountValue (quotUSDAvailableFundsquot) - karena ada dana yang tersedia tidak ditentukan dalam Mata uang dasar Namun, jika Anda memanggil GetAccountValue (quotTotalCashBalancequot), laporan akan dilaporkan dalam mata uang BASE dan mungkin berbeda dengan GetAccountValue (quotUSDTotalCashBalancequot) yang hanya akan mewakili uang tunai USD. Perbedaan akan terjadi jika Anda memiliki posisi kas dalam banyak mata uang sehingga mata uang quotbasequot menunjukkan total kotor semua posisi di semua mata uang seolah-olah mereka ditukar dengan mata uang dasar GetExecInfo (string OrderId,. String Field) Fungsi ini mengambil nilai Field of OrderId Urutan dari daftar eksekusi nilai numerik atau sting dari Bidang Permintaan untuk OrderId. Null jika tidak ada lapangan atau tidak ada posisi seperti itu Parameter: OrderId - string yang menentukan pesanan (dikembalikan oleh fungsi PlaceOrder atau diambil oleh GetExecList). Bidang - salah satu nama kolom ditemukan di halaman quotExecutionsquot IB Controller. Misalnya quotAvg. Pricequot memberikan harga rata-rata pembelian keamanan yang diberikan, quotFilledquot memberikan jumlah saham yang terisi penuh GetExecList (tipe nomor. String filters) (baru di 1.3.0) Mengembalikan daftar perintah yang dipisahkan dari daftar eksekusi dari daftar eksekusi Parameter: Type - menentukan apa yang harus dikembalikan 0 - Memberi ORDERID (saat ini HANYA nilai diterima) Filter - bila tidak kosong maka kirim IBc bahwa hanya pesanan dengan status tertentu yang harus dikembalikan saat kosong - semua pesanan dari daftar pending dikembalikan. Simbol ibc. GetPendingList (0. Diisi) - mengembalikan daftar tanda koma yang dipisahkan dari simbol ID pesanan terisi penuh ibc. GetPendingList (0.) - mengembalikan daftar semua orderid yang ada di daftar quotexecutions listquot Untuk mengekstrak simbol dari daftar gunakan loop jenis ini: Untuk (i 0 (simbol StrExtract (simbol, i)) i) printf (Simbol: simbol n) execlist ibc. GetExecList (0.) daftar semua perintah dari halaman eksekusi execinfo untuk (i 0 (Strtrot II (execlist, i)) I) execinfo execinfo Simbol OID: ibc. GetExecInfo (OID, Simbol) Diisi: ibc. GetExecInfo (OID, Diisi) Rata-rata. Harga: ibc. GetExecInfo (OID, Harga rata-rata) n Fungsi ini mengembalikan teks string pesan kesalahan terakhir yang mewakili pesan kesalahan. Kosong jika tidak ada pesan kesalahan atau tidak ada perintah seperti OrderId - menentukan id pesanan untuk menanyakan informasi kesalahan terakhir dari. Ada nilai khusus yang bisa Anda lewati: 0 (nol) dan memiliki arti khusus: ia mengambil pesan kesalahan terakhir untuk SETIAP pesanan. Inilah pesan yang muncul di bagian atas daftar kesalahan di antarmuka pengguna IBController. GetStatus (string OrderId. Boolean opsional InclFilled) Fungsi ini mengambil status pending order. String yang menggambarkan statusnya, dapat berupa: quotNotYetTransmittedquot, quotPreSubmittedquot, quotPendingquot, quotCancelledquot, quotSubmittedquot, quotFilledquot, quotErrorquot (baru dalam 1.0.2), quotInactivequot atau kosong saat urutan yang cocok tidak ditemukan Tergantung pada bidang yang belum termasuk beberapa status sedang intermiten. Jika InclFilled tidak ditentukan atau sama dengan false (nol) maka hanya status quotNotYetTransmittedquot, quotPendingquot, quotPreSubmittedquot, quotSubmittedquot yang dilaporkan secara konsisten. Status quotCancelledquot dan quotFilledquot bersifat intermiten karena perintah tersebut dihapus dari daftar pesanan yang tertunda dalam waktu satu detik dari pembatalan pengisian pesanan (ini akan berubah di masa mendatang). Status quotErrorquot berarti ada kesalahan saat memproses permintaan terakhir untuk memberi tanda pada daftar pesanan dan Anda dapat menanyakan informasi kesalahan terperinci dengan menggunakan fungsi GetLastError. Jika InclFilled diset ke True maka status order yang tercantum pada daftar quotExecutionsquot dilaporkan dan ini berarti Anda bisa mendapatkan quotCancelledquot, quotFilledquot, quotErrorquot, quotInactivequot secara konsisten. Catatan: Parameter inclFilled telah diperkenalkan di 1.0.8. Parameter: OrderId - string menentukan orderID untuk dimodifikasi (dikembalikan oleh panggilan PlaceOrder atau ModifyOrder sebelumnya). GetPositionInfo (string Ticker. String Field) Fungsi ini mengambil nilai dari simbol Field of Ticker yang saat ini tersimpan dalam portfolio IMPORTANT CHANGE di 1.1.0. Fungsinya TIDAK melaporkan posisi dengan ukuran nol lagi dengan nilai numerik dari field yang diminta untuk Ticker. Null jika tidak ada field atau tidak ada posisi seperti itu Parameter: Ticker - string yang menentukan simbol securitycontract. Simbol harus mengikuti simbologi yang didefinisikan secara rinci di: amibrokerib. html Bidang - salah satu nama kolom yang terdapat di halaman quotPortfolioquot IB Controller. Misalnya quotAvg. Costquot memberikan biaya rata-rata pembelian keamanan yang diberikan, PNB kuotifikasi yang diberikan memberikan keuntungan dan kerugian yang belum direalisasi. Fungsi ini mengambil jumlah sharecontract dari simbol Ticker yang saat ini tersimpan dalam portofolio jumlah yang menunjukkan ukuran posisi yang dipegang saat ini untuk Ticker. Angka positif berarti posisi panjang, angka negatif berarti posisi pendek, nol berarti ticker yang diberikan tidak dipegang dalam portofolio. Parameter: Ticker - string yang menentukan simbol kontrak keamanan. Simbol harus mengikuti simbologi yang didefinisikan secara rinci di: amibrokerib. html IsConnected () Fungsi ini mengambil status koneksi ke TWS. 0 - NO koneksi 1 - koneksi sedang berlangsung 2 - berarti koneksi OK, tidak ada pesan 3 - koneksi OK, tapi TWS menghasilkan beberapa pesan peringatan (lihat tab quotMessages) IsOrderPending (string OrderId) Fungsi ini memeriksa apakah perintah yang diberikan masih dalam proses (atau belum ditularkan). Benar - jika pesanan masih dalam daftar tertunda, Salah jika pesanan telah Diisi, dibatalkan atau tidak ada urutan seperti itu sama sekali Parameter: OrderId - string yang menentukan orderID yang akan dimodifikasi (dikembalikan oleh panggilan PlaceOrder atau ModifyOrder sebelumnya). Mengembalikan daftar simbol yang dipisahkan koma dari posisi terbuka saat ini. PERUBAHAN PENTING di 1.1.0. Fungsi TIDAK melaporkan posisi dengan ukuran nol lagi daftar posisi terbuka dan ukurannya ibc GetTradingInterface (IB) untuk (i 0 (simbol StrExtract (openpos, i)) i) printf (Posisi i tSimbol: simbol tSize: ibc. GetPositionSize ( Simbol) n) Mengembalikan daftar perintah yang dipisahkan dari koma dari daftar yang tertunda Parameter: Tipe - menentukan apa yang harus dikembalikan 0 - memberi ORDERID, 1 memberi daftar simbol Filter - bila tidak kosong, hal itu memberitahu IBc bahwa hanya pesanan dengan status tertentu yang harus dikembalikan saat kosong - semua pesanan dari daftar tertunda dikembalikan. Simbol ibc. GetPendingList (0. Pending) - mengembalikan daftar koma yang dipisahkan dari simbol ID pending order ibc. GetPendingList (1. Pending) - mengembalikan daftar SIMBOL yang dipisahkan koma yang memiliki simbol pending order ibc. GetPendingList (0. Error) - returns list Dari orderids yang memiliki simbol kesalahan ibc. GetPendingList (0. Canceled) - mengembalikan pesanan yang dibatalkan (ingatlah bahwa pesanan yang dibatalkan secara otomatis dihapus dari daftar setelah beberapa detik) simbol ibc. GetPendingList (0.) - mengembalikan daftar semua orderIDs Yang ada di dalam daftar quotpending listquot (mungkin pendengar dicoror sebagian diisi, dll) Untuk mengekstrak simbol dari daftar gunakan loop jenis ini: for (i 0 (simbol StrExtract (simbol, i)) i) printf (Simbol: simbol n) CloseAllOpenPosition (opsional String Ticker) (baru di 1.0.8) Mengirimkan perintah untuk menutup semua posisi yang saat ini terbuka. Kirimkan pesanan PASAR SELLBUY untuk setiap posisi LONGSHORT di halaman portofolio - secara efektif harus menutup semua posisi terbuka (asalkan perintah penutupan akan terisi dengan benar), namun perlu dicatat bahwa perintah penutup ini mungkin gagal (misalnya saat pasar ditutup ) Baru di 1.1.0: sekarang fungsi menerima parameter opsional. Bila sudah disediakan, fungsi menutup posisi hanya pada ticker tertentu. Jika tidak ditentukan - beroperasi seperti sebelumnya (tutup posisi pada semua simbol). CancelAllPendingOrders (string Ticker opsional) (baru di 1.0.8) Membatalkan semua perintah yang tertunda Mengirimkan membatalkan untuk setiap pesanan yang ditampilkan di halaman Perintah Pending (kecuali perintah dengan Kesalahan) Baru di 1.1.0: sekarang fungsi menerima parameter opsional . Bila sudah disediakan, fungsinya hanya membatalkan pesanan ticker tertentu. Jika tidak ditentukan - ia beroperasi seperti sebelumnya (membatalkan semua perintah yang tertunda pada semua simbol). Transmit (string OrderID) (baru di 1.0.8) Memodifikasi flag pengiriman pada urutan NotYetTransmitted Parameter: OrderID - string yang menentukan orderid dikembalikan oleh PlaceOrder Returns non-zero (true) ketika orderid telah ditemukan pada daftar tunggu dan nol sebaliknya. Tidak penting artinya bahwa mentransmisikan berhasil. Transmit (orderid) digunakan untuk mentransmisikan perintah yang sebelumnya ditempatkan dengan flag mengirimkan ke false. Transmit internal ditangani dengan memanggil quotmodify fungsi orderquot (jadi Anda tidak perlu menentukan parameter yang sama lagi) namun perhatikan bahwa TWS memiliki masalah dalam penanganan permintaan modifikasi yang datang terlalu cepat, sehingga Anda TIDAK dapat memanggil modifytransmit segera setelah melakukan pemesanan dengan mengirimkan Salah. Dalam kasus tersebut sebaiknya menggunakan pemicu manual yang cukup lambat sehingga tidak menimbulkan masalah. Contoh: ibc. Transmit (orderid) Ini adalah fungsi EXPERIMENTAL. Menangguhkan eksekusi untuk jumlah milidetik tertentu. Tolong jangan gunakan fungsi ini kecuali Anda benar-benar harus melakukannya. Karena mengunci kedua IBController dan AmiBroker untuk jangka waktu tertentu dan kedua aplikasi tersebut tidak akan merespons tindakan pengguna (seperti input mousekeyboard). Jika Anda menunda eksekusi lebih dari beberapa detik AmiBroker akan mengeluh tentang server OLE yang tidak merespons. Contoh: ibc. Sleep (1000) tidur selama 1000 milidetik 1 detik Menghapus daftar tampilan yang ditentukan. Dimana ListNo bisa menjadi: 0 - daftar pesanan tertunda 1 - daftar eksekusi 2 - daftar portofolio 3 - daftar informasi akun 4 - daftar pesan kesalahan -1 - arti khusus (baru dalam 1.3.5) - hapus daftar SEMUA ibc. ClearList (4) Membersihkan daftar pesan kesalahan Perhatikan bahwa fungsi ini hanya mempengaruhi tampilan, TIDAK mempengaruhi status pesanan. Jadi jika Anda memiliki pesanan aktif, daftar quotpeclarationquot akan diisi ulang dengan pesanan aktif saat ini selama pembaruan status berikutnya (biasanya dalam sepersekian detik - jadi mungkin tidak terlihat secara visual) Ini juga berlaku untuk daftar informasi portofolio dan akun. - mereka akan diisi ulang dengan update akun berikutnya - biasanya dalam beberapa detik. SetAccount (akun string) (baru di 1.1.0, berubah di 1.3.5) PENTING: Fungsi fungsi ini telah BERUBAH DALAM 1.3.5 HANYA UNTUK akun FA (penasihat keuangan). Mengatur akun aktif untuk panggilan PlaceOrder () ModifyOrder () berikutnya. Perhatikan bahwa juga mungkin sekarang untuk menentukan akun tujuan secara langsung melalui parameter yang dilewatkan ke PlaceOrderModifyOrder alih-alih mengandalkan SetAccount (). SetAccount () TIDAK menghapus daftar lagi dan TIDAK mengubah akun tampilan seperti pada versi pra-1.3.5. Menghapus eksekusi dan daftar tertunda bermasalah karena saat mengalihkan akun informasi tentang pesanan yang dikirim sebelumnya pada akun yang berbeda hilang pada akun FampF. Jadi SetAccount () tidak menghapus daftar secara otomatis. Jika Anda ingin melakukan ini, Anda dapat menghubungi ClearList (-1) secara eksplisit. Juga fungsi ini TIDAK mengubah akun yang ditampilkan di jendela informationquot quotaccount dan tab quotportfolioquot. Untuk mengubah akun yang ditampilkan di halaman kuotom informasi quotaccount dan tab kuototcomport menggunakan fungsi baru SetInfoAccount (). Pemisahan akun pesanan dan tampilan memungkinkan pengarahan pesanan ke akun mana pun dengan mengubah tampilan apa pun, yaitu Anda dapat memantau akun quotAllquot - yang menampilkan informasi kumulatif untuk semua akun FampFFA atau akun lainnya sambil menempatkan pesanan untuk akun lain. Secara default melihat informasi adalah akun quotququot dan dalam kebanyakan kasus tidak perlu mengubahnya karena menerima update dari semua sub-akun. SetInfoAccount (akun string) (baru di 1.3.5) Fungsi ini mengubah akun yang ditampilkan di jendela kuotasi informasi kuotasi dan tab kuototcomotot. Ini TIDAK mengubah akun yang digunakan untuk pesanan. Pemisahan akun pesanan dan tampilan memungkinkan pengarahan pesanan ke akun mana pun dengan mengubah tampilan apa pun, yaitu Anda dapat memantau akun quotAllquot - yang menampilkan informasi kumulatif untuk semua akun FampFFA atau akun lainnya sambil menempatkan pesanan untuk akun lain. Secara default melihat informasi adalah akun quotququot dan dalam kebanyakan kasus tidak perlu mengubahnya karena menerima update dari semua sub-akun. Perhatikan bahwa IB menggunakan subskrip quotAquot untuk menunjuk akun quotAllquot yang terdiri dari semua subakun. Jadi jika akun FA Anda memiliki sejumlah F1234, Anda perlu menambahkan kuota kuota untuk mendapatkannya untuk mengumpulkan data agregat: Menutup koneksi ke TWS dan membukanya kembali, menghapus semua daftar dan permintaan untuk pesanan yang tertunda. Intinya memberikan efek yang sama seperti yang akan Anda capai dengan menghentikan dan menjalankan kembali IB Controller. 1. Menempatkan dan mentransmisikan Order Beli Pasar untuk 100 saham saat MACD melintasi di atas Garis Sinyal: Beli Cross (MACD (), Signal ()) jika (LastValue (Buy)) ibc GetTradingInterface (IB) periksa apakah kita terhubung OK jika (ibc. IsConnected ()) memeriksa apakah kita tidak memiliki posisi terbuka pada saham ini jika (ibc. GetPositionSize (Name ()) 0) mengirimkan pesanan ibc. PlaceOrder (Nama (), Buy 100. MKT 0. 0. Hari Benar) 2. Menempatkan batas permintaan batas pada harga sekarang ditambah 0,10 tetapi tanpa mentransmisikannya (diperlukan pengiriman manual). Kode ini bisa dijalankan berkali-kali dan akan memodifikasi pesanan yang ada asalkan tidak ditransmisikan. Menggunakan variabel statis untuk menyimpan orderId dari last run. Beli L gt Ref (H - 1) beli saat harga gap up if (LastValue (Buy)) ibc GetTradingInterface (IB) periksa apakah kita terhubung OK jika (ibc. IsConnected ()) memesan hanya jika kita belum memiliki Buka posisi pada simbol ini if ​​(ibc. GetPositionSize (Name ()) 0) mengambil orderID dari run sebelumnya, akan kosong jika tidak ada order yang ditempatkan sebelum OrderID StaticVarGetText (Nama OrderID ()) menempatkan atau memodifikasi pesanan - jangan kirim namun OrderID Ibc. ModifyOrder (OrderID, Name (), BUY 100. LMT LastValue (C) 0.10 0. 0. Hari Salah) order orderID untuk selanjutnya dijalankan jadi kita tahu urutan mana untuk memodifikasi StaticVarSetText (Nama OrderID (), OrderID) 3 Menempatkan pemodifikasian secara manual dari dialog Parameter. Kode yang akan diterapkan di Indikator Builder. (Diubah untuk menggunakan fitur baru di 1.0.2) Kode ini dapat dijalankan berkali-kali dan akan mengubah pesanan yang ada asalkan tidak dikirim. Menggunakan variabel statis untuk menyimpan orderId dari last run. Param Blockist (Order. BUYSELLSSHORT) OT ParamList (Jenis Pesanan MKTLMTSTP) TIF ParamList (Waktu Berlaku. DAYGTCIOC) Ticker (Aksi) BUFTELLHARD) Parameter Parameter (Tunggu Parameter Waktu) Force ParamTech (Ticket Modifikasi existingAlways place new order) ParamStr (Ticker. Name ()) NumShares Param (Jumlah Saham 10. 10. 100. 10) LimitPrice LastValue (C) Param (Harga Batasan offset 0, - 0,1. 0,1. 0,01) Parameter StopPrice LastValue (C) Stop price offset 0, - 0,1, 0.1, 0.01) Transmit ParamToggle (Transmit TIDAK mentransmitTransmit 0) TriggerCancel ParamTrigger (Batalkan Order. Klik disini untuk Cancel order) Msg variabel ini menyimpan teks pesan kesalahan contoh dari antarmuka perdagangan ibc GetTradingInterface (IB) mengambil orderID dari run sebelumnya, akan kosong jika tidak ada order yang dilakukan sebelum OrderID StaticVarGetText (OrderID Ticker) if (TriggerOrder) memeriksa apakah kita terhubung OK jika (ibc. IsConnected ()) if (Mode 1) OrderID i Mode f diset ke selalu baru maka perintah clear orderid order hanya jika kita tidak memiliki posisi terbuka di tempat simbol ini atau memodifikasi pesanan - jangan kirim juga OrderID ibc. ModifyOrder (OrderID, Ticker, ACT, NumShares, OT, LimitPrice, StopPrice , TIF, Transmit) store orderID untuk jangka selanjutnya jadi kita tahu urutan untuk memodifikasi StaticVarSetText (OrderID Ticker, OrderID) if (Mode 1) Msg Order baru telah ditempatkan dengan ID lain Msg Order yang ditempatkan di bawah id Msg Msg OrderID on Now () Else Msg Placed order gagal karena tidak ada hubungannya dengan TWS if (TriggerCancel) if (OrderId) if (OrderComm) jika (ibc. CancelOrder (OrderId)) Msg Request untuk membatalkan order OrderID berhasil dikirim lagi Msg Request untuk membatalkan order OrderID failed. Lain Msg Tidak dapat membatalkan pesanan becase OrderID adalah kosong execlist ibc. GetExecList (0.) semua execinfo untuk (i 0 (Strtrot II (execlist, i)) i) execinfo execinfo OID Symbol: ibc. GetExecInfo (OID, Symbol) Diisi: Ibc. GetExecInfo (OID, Diisi) Rata-rata Harga: ibc. GetExecInfo (OID, harga rata-rata) n kode pemantauan Judul Msg nLast TWS pesan: ibc. GetLastError (0) dana yang tersedia: ibc. GetAccountValue (AvailableFunds) Pos Bruto. Value: ibc. GetAccountValue( GrossPositionValue ) nOrderID OrderId nTicker Ticker nAction ACT nShares NumToStr (NumShares, 1.0 ) nOrderType OT nLimitPrice NumToStr (LimitPrice, 1.3 ) nStopPrice NumToStr (StopPrice, 1.3 ) nTimeInForce TIF nTransmit NumToStr (Transmit, 1.0 ) n nGetStatus ibc. GetStatus( OrderID ) nGetPositionSize ibc. GetPositionSize( Ticker ) nIsConnected NumToStr (ibc. IsConnected(), 1.0 ) nExecInfon execinfo 4. Placing bracket order create instance of trading interface ibc GetTradingInterface ( IB ) parentID ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTC. False ) ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. False . 100. . parentID ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 26. 26. GTC. True . 100. . parentID ) Note that TRANSMIT flag is set to FALSE on all bracket orders except the last one. This ensures that orders wait until bracket order set is completed. Setting Transmit flag to TRUE on the very last one transmits entire bracket. 5. Iterating through open positions: ibc GetTradingInterface ( IB ) for ( i 0 ( symbol StrExtract ( openpos, i ) ) i ) printf ( Position i tSymbol: symbol tSize: ibc. GetPositionSize( symbol ) n ) 6. Placing OCA group orders: ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. True . 100. . 0. MYGROUP ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 26. 26. GTC. True . 100. . 0. MYGROUP ) 1) Why IBController has BETA status The reason is simple - because it relies on IB API we have no control upon. You need to be aware of the fact that Interactive Brokers may and actually do change TWS and API quite often and any future changes in the APITWS may produce incompatiblities without any warning. We try to adjust IBController as soon as such incompatibilities surface, but we can only do that quotafter the factquot. Due to this there can be periods when IBController does not work properly with certain version(s) of TWS. That is the only reason why IBController is marked as BETA. 2) What exactly is the OrderID, where is the number stored How does it increment Can we assign our own OrderIDs OrderID is a string that represents the unique order number that is assigned by IB Controller (for orders placed via IB Controller) or TWS (for orders placed in TWS) when you place the order. It is automatically incremented on each NEW order. The implementation takes care that generated ID is unique for given session of TWS. You should NOT assign your own IDs because you may risk generating duplicates that will be rejected by TWS. 3) The IB Interface contains a lot of useful information, can we access this information in afl GetAccountValue() function (introduced in 1.0.2) allows that. 4) IMPORTANT. During development i often quotlosequot my connection to the TWS and cannot get it going again. Under what conditions candoes this happen This is probably caused by placing ModifyOrder calls too often so TWS is not able handle them and sends error messages (quotUnable to modify this order as its still being processedquot) and it results in IsConnected() returning false. This should be addressed by next version. If such thing happens you can simply close IB Controller window. 5) Is it possible to read IB LastBifAsk prices while running a eSignal database Right now there is no access to price data via IBController but maybe in the future 6) Why do we have a PlaceOrder() and a ModifyOrder(), if ModifyOrder can be used in both cases Just for completeness. Indeed ModifyOrder alone would be enough. 7) Can we retrieve the quotExecutionsquot and quotPendingquot page (string) from the IB Controller window, for display on the chart Pending - yes you can retrieve the status of the order while it is on quotPendingquot page using GetStatus. As for quotexecutionquot tab - as it is already described in the read me this is in the works. 8) It appears the startup sequence of TWS and AB is significant, is it Not actually TWS and AB - they are independent. But what is important to run TWS before running IB Controller. If you however have your trading code in indicator then it may be auto-refreshed at AB start and in this individual case you would need to run TWS before AB. Anyway if something fails you can simply close IB controller window and it will re-open automatically and reconnect on next call to GetTradingInterface. 9) When the TWSAB connection is broken during trading, what is the best way to restore it Close IB Controller manually. It will re-open automatically and reconnect on next call to GetTradingInterface. 10) What is the consequence of repeated PlaceOrder() or ModifyOrder() execution due to AB Refresh What happens when, instead of using Cross() with use quotgtquot or quotltquot Franly auto-trading interface is NOT indented to be used in indicators. It is intended to be used in AA window. But if you prefer to run it in IB you can do this too, but then you should check pending orders and check portfolio position size for given symbol not to buy too many shares. To answer your question: multiple PlaceOrder calls will result in multiple orders placed. Multiple ModifyOrder() calls may result in the same (if OrderID is empty) or may just result in updating the values of already exisiting, pending order if you specify correct OrderID of order placed before (see the example 2.) 11 ) A quotclearquot Message button would be nice in the IBc window, i have to scroll down continuously to see the latest message (perhaps last-on-top scrolling) It is already available in version 1.0.2 12) What is the best way to write a single-(user initiated)-execution line of code. this is where the ParamTask() i suggested earlier would come in handy. Use new AFL ParamTrigger function ParamTrigger( quotNamequot, quotButton textquot) - to be used in indicator builder - to create triggers (buttons). If you place ParamTrigger in the indicator code it will create a quotbuttonquot in Parameter dialog that can be pressed. Normally ParamTrigger will return zero (0) but when button in the param window is pressed then it will refresh the chart and ParamTrigger will return 1 (one) for this single execution (further refreshes will return zero, until the button is pressed again) trigger ParamTrigger ( Place Order. Click here to place order ) if ( trigger ) your one-shot code here 13) When placing orders from an indicator (the thing to do in RT trading) and editing the code will result in additional afl executions, how can i prevent randon order placement from the extra passes Parameters and Signals may not be the same as a result of using loops, DLLs, and things. Use static variables as given in example 2 to MODIFY existing order instead of placing many new orders. Or use code given in response to question 10 14) I got an warning from TWS that is treated as error in Pending list. How can I solve that You can put specific TWS code onto quotIgnore listquot (use File-gtError code ignore list to enter codes in comma separated list). Any code entered here will be ignored by Pending List page, but still will be displayed in the messages window. 15) some message in the IBc are not clearprecise in their meaning. Well these messages come from TWS and I have no influence on their wording :-) CHANGES FOR VERSION 1.3.8 removed the workaround introduced in 1.3.5 for symbol translation because it caused problems for symbols like 6EU0-GLOBEX-FUT where symbol is not equal to local symbol less expiration code (EUR vs 6E). Instead symbol translation now relies solely on method introduced in 1.3.6 CHANGES FOR VERSION 1.3.7 GetPositionList() returned empty symbol part for non-stocks. Fixed PlaceOrder failed on Financial advisor accounts when non-master Account was passed in a parameter without preceding SetAccount call. Fixed. CHANGES FOR VERSION 1.3.6 IBController now uses more reliable way to translate from local symbol to TWS symbolexpiry pair based on information sent back by TWS. (It is not as simple as one may think because sometimes local symbol does not contain TWS symbol, so one can not derive TWS symbol from local symbol in general case, for example FESX SEP 10 local symbol translates to ESTX50,20100917, therefore IBController needs to get info from TWS) CHANGES FOR VERSION 1.3.5 New SetInfoAccount( account ) This function changes the account which is displayed in the quotaccount informationquot window and quotportfolioquot tabs. It does NOT change account used for orders. Separation of order and viewing accounts allows directing orders to any account withing changing any views, i. e. you can monitorview quotAllquot account - that displays cumulative information for all FampFFA accounts or any other account while placing orders for other accounts. By default viewing information is the quotALLquot account and in most cases there is no need to change it as it receives updates from all sub-accounts. To workaround recent change in TWS, for futures (FUT) symbol field is set by IBController as localsymbol without expiration monthyear. This is temporary workaround which may be broken by other TWS releases. Tested to work with TWS 907.7Pending OrdersExecutionsPortfolioAccount info tabs now have additional command quotAccountquot that specifies the account given item refers toPlaceOrder and ModifyOrder now accept optional Account parameterThis allows to specify destination account for order for FampFFA IB accounts in single call, instead of relying on SetAccountPlaceOrder sequence. Single-call PlaceOrderModifyOrder with account specification allows to specify account without worrying that other threadsprocesses can switch the account between SetAccount() and PlaceOrder(). Now SetAccount() only sets account for NEXT order(s). It does NOT clear lists anymore and does NOT change viewing accountClearing execution and pending list was problematic because when switching accounts the information about previously sent orders on different account was lost on FampF accounts. So SetAccount() does not clear lists automatically. If you want to do this, you can call ClearList( -1 ) explicitely. Also this function does NOT change the account which is displayed in the quotaccount informationquot window and quotportfolioquot tabs. To change account displayed in the quotaccount informationquot page and quotportfolioquot tabs use new function SetInfoAccount(). Separation of order and viewing accounts allows directing orders to any account withing changing any views, i. e. you can monitorview quotAllquot account - that displays cumulative information for all FampFFA accounts or any other account while placing orders for other accounts. By default viewing information is the quotALLquot account and in most cases there is no need to change it as it receives updates from all sub-accounts. ClearList() method accepts -1 as listno - then it clears ALL lists CHANGES FOR VERSION 1.3.2 fixed compatibility issues with TWS version 904 CHANGES FOR VERSION 1.3.1 added configuration file to support AmiBroker 5.30 trading from chart functionality CHANGES FOR VERSION 1.3.0 added GetExecList and GetExecInfo functions. CHANGES FOR VERSION 1.2.1 The IBc now accepts new symbology convention with 4th part defining currency: SYMBOL-EXCHANGE-TYPE-CURRENCY. When currency is not specified USD is used as default. For more info see amibrokerib. html The IBc also accepts single letter type codes CHANGES FOR VERSION 1.2.0 IBc now allows to define which error codes should be ignored using File-gtError code ignore list upgraded to use latest TWS API 9.41 (tested with latest TWS 885.7, requires at least 879) following TWS API changes ignoreRth and rthOnly flags are removed and replaced with single flag: outsideRTH Quote from TWS DOC interactivebrokersensoftwareapiReleaseNotesapi94.phpibentityllc quotOutsideRTH Flag Replaces quotIgnore Regular Trading Hoursquot and quotRegular Trading Hours Onlyquot Flags Supported in: All API Platforms A new, single order atttibute, bool OutsideRTH(), replaces two flags: ignoreRTH and rthOnly in the Order classstruct. If set to true, this new extended order attribute allows orders to trigger or fill outside of regular trading hours. quot CHANGES FOR VERSION 1.1.1 primaryExchange is now set to empty. This solves quotinvalid symbolquot problem occuring for some accounts during last 2 weeks following apparent changes in IB. CHANGES FOR VERSION 1.1.0 Added handling of error codes 2100, 1100, 1101, 1102, 1300 Financial advisor Account support (FC Issue 69) : Added FA-only fields to PlaceOrderModifyOrder When run on FA account IBc automatically queries for account list and uses quotAllquot account by defaultGetAccountValue now allows to query values separately for each currency. Currency specific values are available using this syntax: CURFieldName where CUR is currency symbol for example: USDAvailableFunds EURAvailableFundsWhen currency is NOT specified IBc first looks for values specified in BASE currency and if not found then uses USD as default, so you can use old-style GetAccountValue(quotAvailableFundsquot) and it will return the same as GetAccountValue(quotUSDAvailableFundsquot) - because there available funds are not specified in base currency. If you however call GetAccountValue(quotTotalCashBalancequot) it will report in BASE currency and it may be different from GetAccountValue(quotUSDTotalCashBalancequot) which will represent USD cash only. Differences will occur if you have cash positions in many currencies so quotbasequot currency shows gross total of all positions in all currencies as if they were exchanged into base currency. added limit of error messages to be displayed (File-gtConfigure)added re-querying for positions after reconnectan option to restartreconnect (File-gtReconnect), new method Reconnect()CancelAllPendingOrders( optional Ticker ) now CancelAllPendingOrders method takes optional parameter Ticker. If it is specified - it cancels orders only for specified symbol. If it is NOT specified - it cancels all orders for ALL symbols. ClearList( iListNo ) method added ClearList( ListNo ) where ListNo can be: 0 - pending order list 1 - execution list 2 - portfolio list 3 - account information list 4 - error message listibc. ClearList( 4 ) clears error message list Note that this function only affects the display, it does NOT affect the status of orders. So if you have any active orders the quotpending ordersquot, quotexecutionsquot lists will be re-filled with currently active orders during next status update (usually within fraction of second - so it may not be visually noticeable) It also applies for portfolio and account information lists - they will be re-filled with next account update - usually within few seconds. CloseAllOpenPositions( optional Ticker ) now CloseAllOpenPosition method takes optional parameter Ticker. If it is specified - it closes positions only for specified symbol. If it is NOT specified - it closes all positions. exchange is reported correctly for non-US stocks in Portfolio pageGetPositionList() - returns only symbols with positions ltgt 0OCA groups support added to PlaceOrderModifyOrderuser-definable port and IP number (File-gtConfigure)SetAccount( AccNo ) - for FA accountsWarning 2107 (Historical Market Data Service inactive) and 2104 (market data OK) is silently ignored now CHANGES FOR VERSION 1.0.8 GetStatus() function now has optional parameter InclFilled GetStatus( string OrderId, optional boolean InclFilled ) when InclFilled is provided and set to true GetStatus function provides statuses for filled, cancelled and error orders that may have been already deleted from pending list. TimeInForce field in PlaceOrderModifyOrder allows now to specify quotGood Till Datequot and quotGood After Timequot datetimes)TimeInForce field in PlaceOrderModifyOrder accepts GTD and GAT specifications GTD - Good Till Date - indicates that the order should remain workign untilthe time and date set. Good Till Date specification GTD YYYYMMDD HH:MM:SS TZONE where: YYYY is 4 digit year, MM is 2 digit month, DD is 2 digit day, HH is 2 digit hour, MM is 2 digit minute, SS is 2 digit second (OPTIONAL), TZONE is time zone (OPTIONAL) After regular TimeInForce specifications (DAY, GTC, GTD) you may add extraGoodAfterTime (GAT) part. GAT part comes AFTER semicolon. It indicates thattrade should be submitted after the time and date set: GAT specifications: DAYGAT YYYYMMDD HH:MM:SS TZONE - day order valid after specified datetime GTCGAT YYYYMMDD HH:MM:SS TZONE - good till canceled order valid after specified time GTD yyyymmdd hh:mm:ss tzoneGAT YYYYYMMDD HH:MM:SS TZONE - GTD order valid after specified time where: YYYY is 4 digit year, MM is 2 digit month, DD is 2 digit day, HH is 2 digit hour, MM is 2 digit minute, SS is 2 digit second (OPTIONAL), TZONE is time zone (OPTIONAL) Note: there must be NO SPACE characted between semicolon and GAT string. ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. DAYGAT 20051214 18:00:00 GMT. True ) - day limit order good after Dec 14,2005, 18:00 GMT ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. GTD 20051215 17:00:00 GMTGAT 20051214 18:00:00 GMT. True ) - limit order valid from Dec 14,2005 18:00 to Dec 15,2005 17:00 GMT ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. GTD 20051215 19:00:00 GMT. True ) - limit order valid from now until Dec 15,2005 19:00 GMT Portfolio page should now display correct exchange for futures (now it uses reqContractDetails to query for exchange string that is not sent via accountUpdates by TWS) new Transmit( orderID ) method Transmit( string orderid )- returns non-zero (true) when orderid has been found on the pending order listand zero otherwise. It does not necesarily mean that transmit was successful. Transmit( orderid) is used to transmit orders previously placed with transmit flag set to false. Transmit internally is handled by calling quotmodify orderquot function (so you dont need to specify the same parameters again) but note that TWS has problems with handling modify requests coming too quickly, so you will NOT be able to call modifytransmit immediatelly after placing order with transmit false. In such cases we recommend using manual trigger that is slow enough not to cause problems. GetPositionList() method added - returns comma separated list of currently open positionslist of open positions and their sizes ibc GetTradingInterface ( IB ) for ( i 0 ( symbol StrExtract ( openpos, i ) ) i ) printf ( Position i tSymbol: symbol tSize: ibc. GetPositionSize( symbol ) n ) GetPendingList( Type, Filter ) - retrieves comma-separated list of orders from pending listwhere: Type - specifies what should be returned 0 - gives ORDERIDs, 1 gives symbol lists Filter - when not empty it tells IBc that only orders with specified status should be returned when empty - all orders from pending list are returned. symbols ibc. GetPendingList( 0. Pending ) - returns comma separated list of pending order IDs symbols ibc. GetPendingList( 1. Pending ) - returns comma separated list of SYMBOLS that have pending orders symbols ibc. GetPendingList( 0. Error ) - returns list of orderids that have errors symbols ibc. GetPendingList( 0. Cancelled ) - returns cancelled orderids (please keep in mind that cancelled order are automatically removed from the list after few seconds) symbols ibc. GetPendingList( 0. ) - returns list of all orderIDs present in the quotpending listquot (may be pendingerrorcancelledpartially filledsubmitted, etc) added experimental Sleep() methodSleep( number Milliseconds ) - suspends the execution for specified number of milliseconds. Please do NOT use this function unless you really have to, because it locksboth IBController and AmiBroker for specified period of time and both applicationswont respond to user actions (such as mousekeyboard input). If you suspendexecution for more than few seconds AmiBroker will complain about OLE server not responding. added CloseAllOpenPositons(), CancelAllPendingOrders methods and Panic buttonCloseAllOpenPositions() method - sends MARKET SELLBUY order for each and every LONGSHORT position in the portfolio page - should effectively close all open positions (provided that closing orders will fill correctly), note however that it may happen that these closing orders may fail (for example when markets are closed) CancelAllPendingOrders - sends cancel for each and every order displayed in the Pending orders page (with the exception of orders with Errors) Panic button in the toolbar - sends CancelAllPendingOrders() and then CloseAllOpenPositions() Bracket orders support. PlaceOrder and ModifyOrder methods have two additional optional parameters: Attributes and ParentIDPlaceOrder( string Ticker, string Action, number Quantity, string Type, number LimitPrice, number StopPrice, string TimeInForce, bool Transmit, optional number TickSize 100, optional string Attributes quotquot, optional string ParentID quotquot Attributes - is a string that allows to specify additional order attributes (comma separated list). Supported attributes: rthOnly - (OBSOLETE NOW in 1.2.0) if specified means that the order will only be filled during RTH this applies to any order type including limit. ignoreRth - (OBSOLETE NOW in 1.2.0) if specified means that order will trigger not only during Regular Trading Hours (RTH), but also in extended trading (preafter market) this applies to stop orders, conditional orders, and alerts it is used by the triggering logic. If not specified (false) orders will trigger ONLY during RTH. allOrNone - fill all or nothing at all eTradeOnly - tra de with electronic quotes only firmQuoteOnly - trade with firm quotes only By default all those flags are INACTIVE (OFF) Example: ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTD 20051215 19:00:00 GMT. True . 100. allOrNone ) (Note that optional parameter TickSize MUST be specified if you want to use Attributes) ParentID - is a string that specifies parent order identifier (returned by previous PlaceOrder call) allowing you to place BRACKET orders. parentID ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTC. False ) ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. False . 100. . parentID ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 0. 26. GTC. True . 100. . parentID ) now IBController does not require API installation CHANGES FOR VERSION 1.0.6 re-compiled with TWS API 8.41 BETA CHANGES FOR VERSION 1.0.5 fixed problem with GetPositionSize() reporting zero for SMART routed symbols in 1.0.4 CHANGES FOR VERSION 1.0.4 fixed symbology used in Order, Status and Porfolio pages so now futures and currencies work nicely added optional TickSize parameter that defines minimum price fluctuation allowed for given symbol (expressed in pips, i. e. 0.0001). For stocks usually 100 (i. e. 0.01), for Forex: 1. automatic reconnect implemented - IBc now attempts to reconnect to IB every 5 seconds when case connection is lost or IB has crashed and was restarted Now works with quotFire OpenOrder on status changequot setting turned off as well as turned on. Order once marked with quotErrorquot status keeps last error message CHANGES FOR VERSION 1.0.3 compiled with TWS API 8.30 added GetPositionInfo method added unlock code dialog (File-gtEnter Unlock code). IBController by default does not transmit orders automatically. Transmission can be enabled by entering unlock code that is made available to the user after accepting the agreement. CHANGES FOR VERSION 1.0.2 IBC: Now pending order list features new status code quoterrorquot and new column: Last error IBC: New toolbar button: auto-cancel orders with errors - when turned on, all orders with errors are cancelled automatically IBC: Error messages now show order id and error code IBC: Repeating messages are now displayed once with appropriate repeat count and last update time IBC: Most recent error messages now appear on the top of the quotmessagequot list, so you dont need to scroll IBC: quotDuplicate order IDquot problem solved Now when TWS sends quotduplicate orderquot message, appropriate order line is marked in IB Controlled as quoterrorquot and such order ID is no longer used. When new ModifyOrder is placed then new order id will be assigned IBC: GetAccountValue function in IB interface CHANGES FOR VERSION 1.0.1 CancelOrder() removes quotNotYetTransmittedquot orders from the pending list IsConnected() funcition now returns integer values 0..3 (not bool) Clear Messages toolbar button added CHANGES FOR VERSION 1.0.0 HOW TO REPORT BUGS If you experience any problem with this beta version please send detailed description of the problem (especially the steps needed to reproduce it) to bugs at amibrokerThe Snake Trading System - Forex Strategies - Forex Resources - Forex Trading-free forex trading signals and FX Forecast 461 The Snake Trading System ALL INDICATORS REPAINT For each indicators, there are a max number of bars within the signal can be repainted, it depends on how many bars the signal is calculated. If its calculated on the last 3 bars, the signal behind the fourth bar cant repaint. If the signail is calculated on the last bar only, it repaint the current open bar only, and you can trade the signal at the closing of the bar. Improperly, theyre called non-repainting indicators. Most indicators wich gives signails to EA (Auto-Trading systems, wich needs only clear signals) works this way, but this is not necessarily the best way to build an indicator for a discrtetional trading system. In a Discretional Trading Stystem repainting is a problem too. You cant have feeling with disappearing arrows, lines and dots Luckly, human eye can filter good and bad signals quite easily, using other indicators monitoring different paramenters. Sometimes, in a trading system . is better let the Trading system give you some fast signals, in addition to other lagged indicator, stronger. Share your opinion, can help everyone to understand the forex strategy. Todays Stock Market News amp Analysis Real-Time After Hours Pre-Market News Flash Quote Summary Quote Interactive Charts Default Setting Please note that once you make your selection, it will apply to all future visits to NASDAQ. Jika, sewaktu-waktu, Anda tertarik untuk kembali ke setelan default kami, pilih Setelan Default di atas. Jika Anda memiliki pertanyaan atau mengalami masalah dalam mengubah pengaturan default Anda, silakan email isfeedbacknasdaq. Konfirmasikan pilihan Anda: Anda telah memilih untuk mengubah pengaturan default untuk Pencarian Kutipan. Ini sekarang akan menjadi halaman target default Anda kecuali jika Anda mengubah konfigurasi Anda lagi, atau Anda menghapus cookies Anda. Yakin ingin mengubah setelan Anda Kami mohon untuk meminta Harap nonaktifkan pemblokir iklan Anda (atau perbarui setelan Anda untuk memastikan javascript dan cookie diaktifkan), sehingga kami dapat terus memberi Anda berita pasar tingkat pertama Dan data yang Anda harapkan dari kami.

Comments