I have this.It will give you a nice visual of 10 pips vertically. It also includes some vertical lines the correspondent to moving averages I use.
Btw i wanna draw with current candle ...
#property indicator_chart_window int nLines = 1000; // Number of total rectangles to draw datetime CurrentTime; int start() { if (CurrentTime != Time[0]) { CurrentTime = Time[0]; double lineInterval = 0.0020; // interval between rectangles double normPrice = NormalizeDouble(Close[1],3); // Current price is rounded to nearest "10" datetime timeGap = (Time[0] - Time[1]); // find time from one bar to the next for (int ix = 0; ix < nLines; ix++) // Loop span number of times { ObjectCreate("tensRec"+ix, OBJ_RECTANGLE, 0, Bars, normPrice+((ix-(nLines/2))*lineInterval), Time[0], normPrice+((ix-(nLines/2))*lineInterval+0.0010)); // Place half above and half below the current price ObjectSet("tensRec"+ix,OBJPROP_TIME2,Time[0] + (timeGap*500)); // keep the rectangle stretching off screen right ObjectSet("tensRec"+ix,OBJPROP_COLOR,0x101010); // Make the rectangles look better } ObjectCreate("VertLine4", OBJ_VLINE, 0, Time[4], Bid); // draw vert line ObjectSet("VertLine4", OBJPROP_TIME1, Time[4]); ObjectSet("VertLine4", OBJPROP_COLOR, 0x202020); ObjectSet("VertLine4", OBJPROP_BACK, true); ObjectCreate("VertLine8", OBJ_VLINE, 0, Time[8], Bid); // draw vert line ObjectSet("VertLine8", OBJPROP_TIME1, Time[8]); ObjectSet("VertLine8", OBJPROP_COLOR, 0x202020); ObjectSet("VertLine8", OBJPROP_BACK, true); ObjectCreate("VertLine24", OBJ_VLINE, 0, Time[24], Bid); // draw vert line ObjectSet("VertLine24", OBJPROP_TIME1, Time[24]); ObjectSet("VertLine24", OBJPROP_COLOR, 0x202020); ObjectSet("VertLine24", OBJPROP_BACK, true); return(0); //All done } }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello. i need an indicator.
i want indicator to draw vertical line X, Y, Z bar after current bar and repaint it each bar.can you help me please?