你好
我试着写一个简单的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>