Hey, Is it possible to replace the arrows on Fractals indicator to horizontal lines ? I've inserted the following code within the IF statement for plotting the high arrows:
ObjectCreate("HLine", OBJ_HLINE,0,0, dCurrent);
ObjectSet("HLine", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("HLine", OBJPROP_COLOR, Green);
ObjectSet("HLine", OBJPROP_WIDTH, 2);
Where dCurrent is High[i] and the plot for the arrow. Shouldn't this then continue to draw the arrow but also a horizontal line over the top of it ? Ive altered dCurrent in ObjectCreate to High and it plots a line in the correct place but nothing appears when i use the code above?
Any Pointers ?
Thanks in advance
You can only have one object for a given name. Your code created the hLine on the oldest bar on the chart.
Why change it if code isn't broken!
it is broken:
Thanks for the replies. Yea i thought that was the issue. I normally build my own scripts on pine in TradingView which is obviously very easy to do. However building stuff for MT4 is a whole other ball game. Basically, i am ultimately looking for Hline to be plotted on the high of the fractal and then be destroyed if price breaks the line further down the line. You can't use a hline function in Pine which is why I'm here.
I've found others asking similar questions throughout the forum but it never seems to result in an answer or functioning script