指定したバーに垂直線を描画
9件の返信
When you need to draw a vertical line on charts for better visual orientation you can use following code to do it:
これを EA Wizard / code / CustomFunctions.mq4 ファイルに追加してください。その後、添付の例に示されているように、Wizardでそのまま使用できます。.
void drawVerticalLine(int barsBack) {
string lineName = "Line"+MathRand();
if (ObjectFind(lineName) != 0) {
ObjectCreate(lineName,OBJ_VLINE,0,Time[barsBack],0);
ObjectSet(lineName,OBJPROP_COLOR, clrRed);
ObjectSet(lineName,OBJPROP_WIDTH,1);
ObjectSet(lineName,OBJPROP_STYLE,STYLE_DOT);
}
}
And use it as shown in the example attached.
The example draws a line on selected chart every day at 8 o’clock
0
Hi Thomas262,
I have test your indicator to draw vertical line and I have not vertical line but red square , I have copied the code in Eawizard/code/customFunctions.mq4.
お手伝いしましょうか?
よろしくお願いいたします
キリスト教徒
0
こんにちは,
can you attach or send the complete EA MQ4 code? I can revise it
0
Hi Thomas262,
sqw file attached
お礼申し上げます
キリスト教徒
0
こんにちは,
what happens if you export it as an EA instead of an indicator? Does it work then?
0
トーマスさん、こんにちは。,
when I export as an EA , It doesn’t work .
see attached log expert.
regards
キリスト教徒
0
こんにちは,
when I exported Drawverticalline.mq4 as an EA it works for me – see pic attached. I see an error on your screenshot in the bottom. Does it appear when you run the code?
0
Hello Thomas262,
ok It works for me too as an EA but only in the strategy tester not when attached on a chart, I would like draw vertical line as an indicator, how can I do ?
regards
キリスト教徒
0
こんにちは,
when attached to a chart as an advisor it works correctly. Unfortunately drawing is not correct when attached as a signal indicator
0
トマス262さん、こんにちは。,
thanks a lot for your help
regards
キリスト教徒
0
9件の返信を表示中 - 1 - 9件目 (全9件中)