2 Lampiran (s) Hai,

Saya mencoba mengkodekan stochastic untuk M1 yang mengambil Informasi M15. Itu tidak berhasil. Telah berusaha untuk mencari tahu. Setiap senior mungkin membantu saya. Terima kasih!!

Ini M15 Anda (IMG 1_4). Seperti yang Anda lihat pada grafik bahwa tanda panah terlihat di sini di M15. Stoch saat ini di OB dan MACD di bawah 0.

Di sini, di M1 (IMG 2_4), Stoch saat ini di OB, namun tidak ada panah.

Jadi saya dapat menempatkan indikator di bagan M1.

Indikator bekerja dengan cara ini, ketika M15 Stoch berada di OB dan MACD di bawah 0 dan M1 Stoch berada di OB, panah akan muncul pada grafik (M1)

Inilah seluruh kode saya

Inserted Code #property indior_chart_window #property indior_buffers 2 #property indior_plots 2/- Arrow #property indior_label1 ArrUp #property indior_label2 ArrDn/- parameter input enum eprice s0 = 0,/RENDAHTINGGI s1 = 1/TUTUPTUTUP;/------------------------------------------------ ---------------------------------------- input string __________ 1 __________ = xxxxxxxxxxxxxxxxxxxxx; input string __________ 2 __________ == ALERT =;/ALERT ARROW DAN NOTIFICATIONS, input string __________ 3 __________ = xxxxxxxxxxxxxxxxxxxxx; input bool ARROW = true;/SHOW ARROW input string __________ 4 __________ = xxxxxxxxxxxxxxxxxxxxx; input string __________ 5 __________ == ARROW CODE =;/ARROW DETAILS string input __________ 6 __________ = xxxxxxxxxxxxxxxxxxxxx; input int ARROWUP = 217;/ARROW CODE input int ARROWDN = 218;/ARROW CODE input color ARROWUPc = clrWhite;/Arrow Up Warna masukan warna ARROWDNc = clrWhite;/Arrow Dn Color input string __________ 10 __________ = xxxxxxxxxxxxxxxxxxxxx; input string __________ 11 __________ == M15 OB OS =;/OB OS, masukan string __________ 12 __________ = xxxxxxxxxxxxxxxxxxxxx; input double sto_dn_level = 20.0;/LEVEL Down input sto_up_level ganda = 80.0;/LEVEL Naik masukan eprice sto_price = 1;/BIDANG HARGA/------------------ -------------------------------------------------- --------------------/- indikator buffer ganda ArrUpBuffer # 91; # 93 ;; ArrDnBuffer ganda # 91; # 93 ;;/-/ ------------------------------------------- ----------------------- /| Fungsi inisialisasi indikator kustom |/ ----------------------------------------------- ------------------- int OnInit ()/- indikator buffer pemetaan IndiorBuffers (2); SetIndexBuffer (0, ArrUpBuffer); SetIndexStyle (0, DRAW_ARROW, STYLE_SOLID, 1, ARROWUPc); SetIndexArrow (0, ARROWUP); SetIndexBuffer (1, ArrDnBuffer); SetIndexStyle (1, DRAW_ARROW, STYLE_SOLID, 1, ARROWDNc); SetIndexArrow (1, ARROWDN);/- kembali (INIT_SUCCEEDED);/ ----------------------------------------------- ------------------- int OnCalculate (const int rates_total, const int prev_calculated, const datetime time # 91; # 93 ;, const double open # 91; # 93; , const double high # 91; # 93 ;, const double low # 91; # 93 ;, const double close # 91; # 93 ;, const tick_volume # 91; # 93 ;, const panjang volume # 91; # 93; , int int spread # 91; # 93; -RRB-/- int i, limit; limit = rates_total-prev_calculated; if (prev_calculatedgt; 0) limit = limit 2; for (i = limit-2; igt; = 0; i--) if (ARROW iMA (_Symbol, PERIOD_M15,50,0, MODE_EMA, PRICE_CLOSE, i) gt; iMA (_Symbol, PERIOD_M15,100,0, MODE_EMA, PRICE_CLOSE, i) iMA (_Symbol, PERIOD_M15, 100,0, MODE_EMA, PRICE_CLOSE, i) gt; iMA (_Symbol, PERIOD_M15,200,0, MODE_EMA, PRICE_CLOSE, i) iMACD (_Symbol, PERIOD_M15,12,26,1, PRICE_CLOSE, MODE_MAIN, i) gt; 0,0 iStochastic (_Simbol, PERIOD_M15,3,1,3, MODE_EMA, (int) sto_price, MODE_MAIN, i) lt; = sto_dn_leveliStochastic (_Symbol, PERIOD_M15,3,1,3, MODE_EMA, (int) sto_price, MODE_SIGNAL, i) lt; = sto_dn_level iStochastic (_Symbol, PERIOD_M1,3,1,3, MODE_EMA, (int) sto_price, MODE_MAIN, i) lt; = sto_dn_level iStochastic (_Symbol, PERIOD_M1,3,1,3, MODE_EMA, (int) sto_price, MODE_SIGNAL, i) lt; = sto_dn_level) ArrUpBuffer # 91; i # 93; = iLow (_Symbol, PERIOD_M1, i) - 10 * pix_y (); if (ARROW iMA (_Symbol, PERIOD_M15,50,0, MODE_EMA, PRICE_CLOSE, i) lt; iMA (_Symbol, PERIOD_M15,100,0, MODE_EMA, PRICE_CLOSE, i) iMA (_Symbol, PERIOD_M15,100,0, MODE_EMA, PRICE_CLOSE , i) lt; iMA (_Symbol, PERIOD_M15,200,0, MODE_EMA, PRICE_CLOSE, i) iMACD (_Symbol, PERIOD_M15,12,26,1, PRICE_CLOSE, MODE_MAIN, i) lt; 0.0 iStochastic (_Symbol, PERIOD_M15,3, 1,3, MODE_EMA, (int) sto_price, MODE_MAIN, i) gt; = sto_up_level iStochastic (_Symbol, PERIOD_M15,3,1,3, MODE_EMA, (int) sto_price, MODE_SIGNAL, i) gt; = sto_up_level iStochastic (_Symbol, PERIOD_M1,3,1,3, MODE_EMA, (int) sto_price, MODE_MAIN, i) gt; = sto_up_level iStochastic (_Symbol, PERIOD_M1,3,1,3, MODE_EMA, (int) sto_price, MODE_SIGNAL, i) gt; = sto_up_level ) ArrDnBuffer # 91; i # 93; = iHigh (_Symbol, PERIOD_M1, i) 10 * pix_y (); kembali (rates_total);/ ----------------------------------------------- ------------------- double pix_y () return ((ChartGetDouble (0, CHART_PRICE_MAX, 0) -ChartGetDouble (0, CHART_PRICE_MIN, 0))ChartGetInteger (0, CHART_HEIGHT_IN_PIXELS, 0));/ ----------------------------------------------- ------------------- # 91; color = # 666666 # 93; # 91; font = trebuchet ms # 93; # 91;font # 93; # 91 ;warna # 93;