Hai,
adakah sesiapa boleh mengatakan kepada saya, kenapa Stoploss (_low [shift]) tidak berfungsi?
Sekali saya menciptanya sebagai penunjuk ... maka [shift] dan rendah [shift] bekerja hebat ... tapi pada pro tidak ... dan bila (Bid gt; _high [I]) tidak berfungsi dengan betul
terima kasih
Kod dimasukkan/ --------------------------------------------- --------------------- /| .mq4 |/| Copyright © 2005-2007, MetaQuotes Software Corp .. |/| http://www.metaquotes.net/|/ ----------------------------------------------- ------------------- #property copyright Copyright © 2007, MetaQuotes Software Corp. #property link http://www.metaquotes.net/extern double Lots = 0.1; extern dual TrailingStop = 30;//- parameter penunjuk extern int ExtDepth = 12; extern int ExtDeviation = 5; extern int ExtBackstep = 3;/- penunjuk penunjuk dwi BufferNumber91; # 93 ;; dual HighMapBufferNumber91; # 93 ;; dual LowMapBuffer # 91; # 93 ;; duanya _high # 91; # 93 ;; dual _low # 91; # 93 ;; dua hujung lepas; dual lastlow; int degree = 3;//mendalamkan mendalam bool downloadhistory = false;/ ----------------------------------------------- ------------------- /| Fungsi permulaan penunjuk kustom |/ ----------------------------------------------- ------------------- int init () IndiorBuffers (7);/- pilihan lukisan/SetIndexStyle (0, DRAW_SECTION);/SetIndexStyle (3, DRAW_LINE);/penanda penunjuk pemetaan SetIndexBuffer (0, Penampan); SetIndexBuffer (1, HighMapBuffer); SetIndexBuffer (dua, LowMapBuffer); SetIndexBuffer (3, lasthigh lasthigh); SetIndexBuffer (4, lastlow); SetIndexBuffer (5, _high); SetIndexBuffer (6, _low); SetIndexEmptyValue (0,0.0);/- penunjuk pendek nama IndiorShortName (ZigZag ( ExtDepth , ExtDeviation , ExtBackstep ));/- inisialkan pulangan dilakukan (0);/ ----------------------------------------------- ------------------- /| |/ ----------------------------------------------- ------------------- int start () int I, counted_bars = IndiorCounted (); batasan int, counterZ, whatlookfor; int shift, belakang, lasthighpos, lastlowpos; double val, res; curvy ganda, curhigh; int cnt, tiket, lengkap; jika (counted_bars == 0* downloadhistory *)/sejarah telah dimuat turun ArrayInitialize (Buffer, 0.0); ArrayInitialize (HighMapBuffer, 0.0); ArrayInitialize (LowMapBuffer, 0.0); jika (counted_bars == 0) had = Bars-ExtDepth; downloadhistory = true; jika (counted_barsgt; 0) manakala (counterZlt; tahap ilt; 100) res = Penampan # 91; I # 93 ;; jika (res! = 0) counterZ ; I ; Saya--; had = saya; jika (LowMapBuffer # 91; I # 93 ;! = 0) curlow = LowMapBuffer # 91; I # 93 ;; whatlookfor = 1; lain curhigh = HighMapBuffer # 91; I # 93 ;; whatlookfor = -1; untuk (I = limit-1; igt; = 0; I--) Penampan # 91; I # 93; = 0.0; LowMapBuffer # 91; I # 93; = 0.0; HighMapBuffer # 91; I # 93; = 0.0; untuk (shift = batasan; shiftgt; = 0; shift -)val = Dikurangkan # 91; iLowest (NULL, 0, MODE_LOW, ExtDepth, shift) # 93 ;; jika (val == lastlow) val = 0.0; sebaliknya lastlow = val; jika ((# 91; peralihan # 93; -val) gt; (ExtDeviation * Peringkat)) val = 0.0; lain untuk (kembali = 1; backlt; = ExtBackstep; kembali ) res = LowMapBuffer # 91; shift kembali # 93 ;; jika ((res!) = 0) (resgt; val)) LowMapBuffer # 91; shift back # 93; = 0.0; jika (Rendah # 91; peralihan # 93; == val) LowMapBuffer # 91; peralihan # 93; = val; sebaliknya LowMapBuffer # 91; peralihan # 93; = 0.0;/- tinggi val = Tinggi # 91; iHighest (NULL, 0, MODE_HIGH, ExtDepth, shift) # 93 ;; jika (val == lasthigh) val = 0.0; sebaliknya lasthigh = val; jika ((val-HighNumber91; peralihan # 93;) gt; (ExtDeviation * Peringkat)) val = 0.0; lain untuk (kembali = 1; backlt; = ExtBackstep; kembali ) res = HighMapBuffer # 91; shift kembali # 93 ;; jika ((res!) = 0) (reslt; val)) HighMapBuffer # 91; shift back # 93; = 0.0; jika (High # 91; shift # 93; == val) HighMapBuffer # 91; shift # 93; = val; sebaliknya HighMapBuffer # 91; peralihan # 93; = 0.0;/tutup memotong jika (whatlookfor == 0) lastlow = 0; lasthigh = 0; lain lastlow = curlow; lasthigh = curhigh; untuk (shift = batasan; shiftgt; = 0; shift -) res = 0.0; suis (whatlookfor) kes 0:/cari puncak atau rumput jika (lastlow == 0 lasthigh == 0) jika (HighMapBufferNumber91; shift # 93 ;! = 0) lasthigh = Dikurangkan # 91; lasthighpos = shift; whatlookfor = -1; Penampan # 91; peralihan # 93; = lasthigh; res = 1; jika (LowMapBuffer # 91; peralihan # 93 ;! = 0) lastlow = Pengurangan # 91; peralihan # 93 ;; lastlowpos = shift; whatlookfor = 1; Penampan # 91; peralihan # 93; = lastlow; res = 1; berpecah; kes 1:/lihat puncak jika (LowMapBuffer # 91; shift # 93 ;! = 0.0 LowMapBuffer # 91; shift # 93; lt; lastlow HighMapBuffer # 91; 93; = 0.0; lastlowpos = shift; lastlow = LowMapBuffer # 91; shift # 93 ;; Penampan # 91; peralihan # 93; = lastlow; res = 1; jika (HighMapBuffer # 91; shift # 93 ;! = 0.0 LowMapBuffer # 91; shift # 93; == 0.0) lasthigh = HighMapBuffer # 91; shift # 93 ;; lasthighpos = shift; Penampan # 91; peralihan # 93; = lasthigh; whatlookfor = -1; res = 1; berpecah; kes -1:/cari rumput jika (HighMapBuffer # 91; shift # 93 ;! 0.0 0.0 HighMapBuffer # 91; shift # 93; gt; lasthigh LowMapBuffer # 91; shift # 93; == 0.0)Penampan # 91; lasthighpos # 93; = 0.0; lasthighpos = shift; lasthigh = HighMapBuffer # 91; shift # 93 ;; Penampan # 91; peralihan # 93; = lasthigh; jika (LowMapBuffer # 91; shift # 93 ;! 0.0 0.0 HighMapBuffer # 91; shift # 93; == 0.0) lastlow = LowMapBuffer # 91; shift # 93 ;; lastlowpos = shift; Penampan # 91; peralihan # 93; = lastlow; whatlookfor = 1; berpecah; lalai: kembali;/switch (whatlookfor)/for (shift = limit; shiftgt; = 0; shift--) complete = OrdersTotal (); jika (totallt; 1) _high # 91; I # 93; = lasthigh; _low # 91; I # 93; = lastlow; jika (Bid gt; = _high # 91; I # 93; -RRB- OrderSend (Symbol (), OP_BUY, Lot, Ask, 3, _low # 91; I # 93 ;, 0, Long, 1,0, Green) (jika tidak), jika tidak (bida lt; _low # 91; peralihan # 93; -RRB- OrderSend (Simbol (), OP_SELL, Banyak, Tawaran, 3,0,0, ;/ ---------------------------------------------- --------------------