你好
我試著寫一個簡單的indior(我從mql語言開始)。
我的室內空間在倫敦開放,4線向上,4線總共9線,寫道
#property indior_buffers 9
#property indior_color1 .....依此類推#9,但這一個(#9)並沒有像其他人那樣用藍色寫成
同樣的情況發生在
#property indior_width1 ...到#9和indior_style
這意味著Metatrader不允許最後一行?
如果沒有,有辦法畫出最後一行嗎?
提前致謝
你好
我試著寫一個簡單的indior(我從mql語言開始)。
我的室內空間在倫敦開放,4線向上,4線總共9線,寫道
#property indior_buffers 9
#property indior_color1 .....依此類推#9,但這一個(#9)並沒有像其他人那樣用藍色寫成
同樣的情況發生在
#property indior_width1 ...到#9和indior_style
這意味著Metatrader不允許最後一行?
如果沒有,有辦法畫出最後一行嗎?
提前致謝
新問題是這個開放價值的陳述?:datetime TimeArray []; double OpenArray []; ArrayCopySeries(OpenArray,MODE_OPEN,符號(),時間範圍);我得到了開放價值,但是在格林尼治標準時間0:00h,我想要倫敦會議的開放價值,應該怎樣?
MODE_OPEN指的是所選蠟燭。這是蠟燭的開放價格。如果是您需要的時間數據,您可能應該使用MODE_TIME。 MT4不知道倫敦何時開放。您必須提供開放時間/日期並蒐索欄。這樣的東西應該給你最新的倫敦開放:PHP代碼:<code> <span style =“color:#000000”> <span style =“color:#0000BB”> intLondonOpenTime </span> <span style =“color :#007700“> = </span> <span style =”color:#0000BB“> 9 </span> <span style =”color:#007700“>;Originally Posted by ;
</span> <span style = “color:#0000BB”> doubleLondonOpenPrice </span> <span style =“color:#007700”>;
for(</span> <span style =“color:#0000BB”> inti </span> <span style =“color:#007700”> = </span> <span style =“color:#0000BB”> 0 </span> <span style =“color:#007700”>; </span> <span style =“color:#0000BB”> i </span> <span style =“color:#007700”> lt; </span> <span style =“color:#0000BB”>條形</span > <span style =“color:#007700”>; </span> <span style =“color:#0000BB”> i </span> <span style =“color:#007700”> )<br> if(</span> <span style =“color:#0000BB”> TimeHour </span> <span style =“color:#007700”>(</span> <span style =“color:#0000BB”> TimeArray </span> <span style =“顏色:#007700“>#91; </span> <span style =”color:#0000BB“> i </span> <span style =”color:#007700“>#93;)== </span> <span style =“color:#0000BB”> LondonOpen </span> <span style =“color:#007700”> </span> <span style =“color:#0000BB”> TimeMinute </span> <span style =“color:#007700”>(</span> <span style =“color:#0000BB”> TimeArray </span> <span style =“color:#007700”>#91; </span> <span style =“color:#0000BB”> i </span> <span style =“color:#007700”>#93;)== </span> <span style =“color:#0000BB”> 0 </span> <span style =“color:#007700”>)</span> <span style =“color:#0000BB”> LondonOpenPrice </span> <span style =“color:#007700”> = </span> <span style =“color:#0000BB”> OpenArray </span> <span style =“color:#007700”>#91; </span> <span style =“color:#0000BB”> i </span> <span style =“color:#007700”>#93 ;;
</span> <span style =“color:#0000BB”> </span> </span> </code>如果時間範圍低於1小時,則必須檢查分鐘太。我修改了上面的例子。
你好,這是我,我已經設法創建基於其他論壇的其他indior基礎上的indior,我有一點問題,indior有8行,我想要他們標記,但只得到其中一個帶標籤,可以有人弄清楚問題是什麼?這是標籤代碼:ObjectCreate(1,OBJ_TEXT,0,0,0); ObjectSetText(1,1,fontsize,Arial,Red); ObjectCreate(0,75,OBJ_TEXT,0,0,0); ObjectSetText(0,75,0,75,fontsize,Arial,Red); ObjectCreate(0,55,OBJ_TEXT,0,0,0); ObjectSetText(0,55,0,55,fontsize,Arial,Red); ObjectCreate(0,35,OBJ_TEXT,0,0,0); ObjectSetText(0,35,0,35,fontsize,Arial,Red); ObjectCreate(-0,35,OBJ_TEXT,0,0,0); ObjectSetText(-0,35,-0,35,fontsize,Arial,Red); ObjectCreate(-0,55,OBJ_TEXT,0,0,0); ObjectSetText(-0,55,-0,55,fontsize,Arial,Red); ObjectCreate(-0,75,OBJ_TEXT,0,0,0); ObjectSetText(-0,75,-0,75,fontsize,Arial,Red); ObjectCreate(-1,OBJ_TEXT,0,0,0); ObjectSetText(-1,-1,fontsize,Arial,Red); if(PBuffer1 [i]!= PBuffer1 [i 1])ObjectMove(1,0,Time [i],P); if(PBuffer2 [i]!= PBuffer2 [i 1])ObjectMove(0.75,0,Time [i],Q); if(PBuffer3 [i]!= PBuffer3 [i 1])ObjectMove(0.55,0,Time [i],R); if(PBuffer4 [i]!= PBuffer4 [i 1])ObjectMove(0.35,0,Time [i],S); if(PBuffer5 [i]!= PBuffer5 [i 1])ObjectMove(-0.35,0,Time [i],T); if(PBuffer6 [i]!= PBuffer6 [i 1])ObjectMove(-0.55,0,Time [i],U); if(PBuffer7 [i]!= PBuffer7 [i 1])ObjectMove(-0.75,0,Time [i],V); if(PBuffer8 [i]!= PBuffer8 [i 1])ObjectMove(-1,0,Time [i],W); P,Q,R,S,T,U,V,W是用indior計算聲明的任何建議都是正確的,或者用有效的東西代替它是好的
打開對象列表(Ctrl-B或右鍵單擊_gt;對象列表)並查看是否創建了對象,如果是,則檢查它們具有哪些屬性和參數。它們可能正在繪製,但不在圖表的可見部分。時間和價格參數是您期望的嗎?Originally Posted by ;
Maybe the condition you set is not true and therefore the Move function is not executed. This works for me. Prints '1' next to the current candle: PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”></span><span style=”color: #FF8000”>// ------------------------------------------------------------------Originally Posted by ;
//|scriptprogrtartfunction|
// ------------------------------------------------------------------
</span><span style=”color: #0000BB”>intstart</span><span style=”color: #007700”>(){
</span><span style=”color: #0000BB”>ObjectCreate</span><span style=”color: #007700”>(</span><span style=”color: #DD0000”>”1”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>OBJ_TEXT</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>);
</span><span style=”color: #0000BB”>ObjectSetText</span><span style=”color: #007700”>(</span><span style=”color: #DD0000”>”1”</span><span style=”color: #007700”>,</span><span style=”color: #DD0000”>”1”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>12</span><span style=”color: #007700”>,</span><span style=”color: #DD0000”>”Arial”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>Red</span><span style=”color: #007700”>);
if(</span><span style=”color: #0000BB”>ObjectFind</span><span style=”color: #007700”>(</span><span style=”color: #DD0000”>”1”</span><span style=”color: #007700”>)gt;=</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>)</span><span style=”color: #0000BB”>ObjectMove</span><span style=”color: #007700”>(</span><span style=”color: #DD0000”>”1”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>Time</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>#93;,</span><span style=”color: #0000BB”>Bid</span><span style=”color: #007700”>);
}
</span><span style=”color: #0000BB”></span> </span> </code> Do this to see if the line is executed and to see what values you are getting: PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”></span><span style=”color: #007700”>if(</span><span style=”color: #0000BB”>PBuffer1</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>#93;!=</span><span style=”color: #0000BB”>PBuffer1</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”> </span><span style=”color: #0000BB”>1</span><span style=”color: #007700”>#93
</span><span style=”color: #0000BB”>Comment</span><span style=”color: #007700”>(</span><span style=”color: #DD0000”>”Time=”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>Time</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>#93;,</span><span style=”color: #DD0000”>”Buf1=”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>PBuffer1</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>#93;,</span><span style=”color: #DD0000”>”Buf2=”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>PBuffer1</span><span style=”color: #007700”>#91;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”> </span><span style=”color: #0000BB”>1</span><span style=”color: #007700”>#93;
</span><span style=”color: #0000BB”></span> </span> </code>