New Feature: Horizontal Lines in Indicators

 
I have just written and designed a custom indicator to display Camarilla levels, but I am a little disappointed with the result. I would like to be able to display the Camarilla levels for each day (on any intraday chart i.e. Period<D1) as a series of discontinuous lines.

My idea is this: use SetIndexStyle(n, DRAW_HLINE) to set the draw style for horizontal lines and have MetaTrader draw a horizontal line from Bar[0] to Bar[1] at the level contained in Buffer[0] and so on.

It's just a suggestion, maybe someone else has a better idea.

Alex
 
Read the manual better. You can already do this...they are called trend lines.

Look up Object types in the mql4 dictionary
 
Read the manual better. You can already do this...they are called trend lines.

Look up Object types in the mql4 dictionary


Thank you for your reply. I know about trend lines, but I was looking for a more convenient way of doing this i.e. without having to create hundreds of objects. Maybe my original wording wasn't clear enough: what I want to do is display Camarilla levels for previous days as well, not just the current day. There are indicators out there which already do this, but the levels for successive days are joined up with diagonal lines which doesn't look good.
 
alexbear,

there is a very good pivot line indicator at:
http://www.strategybuilderfx.com/forums/showthread.php?t=15332&highlight=pivot+lines+day

Just replace the Pivot line calculation with the equations for your Camarilla lines.

Unfortunately, this indicator does not refresh automatically. You need to manually refresh to draw the lines again to the current time - otherwise the best indicator of that kind that I have seen so far.

Let us know if you can fix the problem to have it refresh automatically, or if you know of any better program for it.
 
bubo,

I've posted my Camarilla and Fibonacci indicators here:
http://www.strategybuilderfx.com/forums/showthread.php?p=148463#post148463
 
done very nicely!

i usually use the NY close at 5 pm EST to set a new day - yours uses normal calendar days (with interbank 3 hrs off NY close). Do you plan to incorporate time zones? What do you use for weekends to estimate the most appropriate lines?
 
Thank you bubo.

AFAIK, the start/end of day are determined by your broker's server. In my case, I use Interbank FX and their end of day times are always at 0:00 GMT. I've tested it with various other servers which also allow you to trade index/equity CFDs and in the case of U.S. indices on SBFX the start time is 14.30 GMT and the end time is 21.00 GMT (the same as opening/closing times of the NYSE).

Alex
Reason: