Is it possible to make a discontinuity in an indicator output?

To add comments, please log in or register
robocod
9
robocod  

Hello,

 I'm new to the forum, and to MetaTrader. Sorry if this is a newbie question (probably it won't be the last).

 I'm writing an indicator that tracks intra-day high/low/etc. Resetting the lines back at some "start of day" time, e.g. 8:00am. It's all working fine.

However, it would be good to "break" the lines when the new day starts. Currently, the lines are continuous (no breaks) and so each bar is connected to the next. For example suppose I'm using m5 chart, with "start of day" time as 8:00, I want the line to break between 7:55 and 8:00 (so it is not joined together), because it looks better.

I discovered that I can set the output(s) at 7:55 to EMTY_VALUE and this almost does it, i.e. I get a break in the line. However, it also mean that I lose the actual value of the 7:55 candle! 

 Thanks in advance.

 Robocod

PS: Is this the best place for such questions? 

Carl Schreiber
Moderator
7065
Carl Schreiber  
You can create two buffers one for open till noon and one for noon till close. At noon they are the same and the 'break' cannot be seen.
Amir Yacoby
1216
Amir Yacoby  

you can use different colors to represent the break. It is possible to change indicator line color dynamically while running the indicator.

PlotIndexSetInteger(0,PLOT_LINE_COLOR,0,clrBlue);
whroeder1
17949
To add comments, please log in or register