Essential Features for Grid Traders
Desperately need a round numbers indicator. If that is not in the pipeline, then the ability to add coordinates to horizontal lines etc. It’s almost impossible to get lines exactly at whole number levels without this
- How does this impact your experience?
Comments7
Roman Fedorov
Aug 2, 2025
Hi @User . Can you send us the example of the indicator, please?
An Anonymous User
Aug 2, 2025
Here is the pine script.
//@version=6 indicator("Ultra Round Numbers", overlay = true, max_lines_count = 500) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -- // -- // -- user inputs const string sStep1 = '/////////////////////// STEP #1 ///////////////////////' bool bStep1 = input.bool (true , 'Enable Biggest Step' , group = sStep1 ) float fStep1 = input.float (0.01 , 'Step (Price)' , minval = 0 , group = sStep1 ) int iMaxLines1 = input.int (4 , 'Maximum Lines' , minval = 1 , group = sStep1 ) color cTop1 = input.color (#787b86 , '' , inline = '1' , group = sStep1 ) string sTop1 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '1' , group = sStep1 ) int iTop1 = input.int (3 , ' ' , minval = 1, maxval = 5 , inline = '1' , group = sStep1 ) color cBtm1 = input.color (#787b86 , '' , inline = '2' , group = sStep1 ) string sBtm1 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '2' , group = sStep1 ) int iBtm1 = input.int (3 , ' ' , minval = 1, maxval = 5 , inline = '2' , group = sStep1 ) const string sStep2 = '/////////////////////// STEP #2 ///////////////////////' bool bStep2 = input.bool (true , 'Enable Middle Step' , group = sStep2 ) float fStep2 = input.float (0.005 , 'Step (Price)' , minval = 0 , group = sStep2 ) int iMaxLines2 = input.int (8 , 'Maximum Lines' , minval = 1 , group = sStep2 ) color cTop2 = input.color (#787b86 , '' , inline = '1' , group = sStep2 ) string sTop2 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '1' , group = sStep2 ) int iTop2 = input.int (2 , ' ' , minval = 1, maxval = 5 , inline = '1' , group = sStep2 ) color cBtm2 = input.color (#787b86 , '' , inline = '2' , group = sStep2 ) string sBtm2 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '2' , group = sStep2 ) int iBtm2 = input.int (2 , ' ' , minval = 1, maxval = 5 , inline = '2' , group = sStep2 ) const string sStep3 = '/////////////////////// STEP #3 ///////////////////////' bool bStep3 = input.bool (true , 'Enable Smallest Step' , group = sStep3 ) float fStep3 = input.float (0.0025 , 'Step (Price)' , minval = 0 , group = sStep3 ) int iMaxLines3 = input.int (16 , 'Maximum Lines' , minval = 1 , group = sStep3 ) color cTop3 = input.color (#787b86 , '' , inline = '1' , group = sStep3 ) string sTop3 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '1' , group = sStep3 ) int iTop3 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '1' , group = sStep3 ) color cBtm3 = input.color (#787b86 , '' , inline = '2' , group = sStep3 ) string sBtm3 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '2' , group = sStep3 ) int iBtm3 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '2' , group = sStep3 ) // ===== NEW STEP 4 ===== // const string sStep4 = '/////////////////////// STEP #4 ///////////////////////' bool bStep4 = input.bool (true , 'Enable Extra Small Step' , group = sStep4 ) float fStep4 = input.float (0.001 , 'Step (Price)' , minval = 0 , group = sStep4 ) int iMaxLines4 = input.int (24 , 'Maximum Lines' , minval = 1 , group = sStep4 ) color cTop4 = input.color (#787b86 , '' , inline = '1' , group = sStep4 ) string sTop4 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '1' , group = sStep4 ) int iTop4 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '1' , group = sStep4 ) color cBtm4 = input.color (#787b86 , '' , inline = '2' , group = sStep4 ) string sBtm4 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '2' , group = sStep4 ) int iBtm4 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '2' , group = sStep4 ) // ===== NEW STEP 5 ===== // const string sStep5 = '/////////////////////// STEP #5 ///////////////////////' bool bStep5 = input.bool (true , 'Enable Micro Step' , group = sStep5 ) float fStep5 = input.float (0.0005 , 'Step (Price)' , minval = 0 , group = sStep5 ) int iMaxLines5 = input.int (32 , 'Maximum Lines' , minval = 1 , group = sStep5 ) color cTop5 = input.color (#787b86 , '' , inline = '1' , group = sStep5 ) string sTop5 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '1' , group = sStep5 ) int iTop5 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '1' , group = sStep5 ) color cBtm5 = input.color (#787b86 , '' , inline = '2' , group = sStep5 ) string sBtm5 = input.string ('╌' , ' ' , ['─', '┈', '╌'] , inline = '2' , group = sStep5 ) int iBtm5 = input.int (1 , ' ' , minval = 1, maxval = 5 , inline = '2' , group = sStep5 ) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -- // -- // -- helper functions // -----------------|-------------------|-------------------|-------------------|-------------------|-------------------| // @function Converts a string into a line style. // @param _sLineStyle (series string) The string representing the desired line style ('┈', '╌', or default to solid). // @returns (const string) The corresponding line style. _lineStyle(series string _sLineStyle) => _sLineStyle == '┈' ? line.style_dotted : _sLineStyle == '╌' ? line.style_dashed : line.style_solid // -----------------|-------------------|-------------------|-------------------|-------------------|-------------------| // @function Creates a new horizontal line with specified parameters. // @param _fY (series float) Y-coordinate (price). // @param _cColor (series color) Color of the line. // @param _sStyle (series string) Style of the line. // @param _iWidth (series int) Width of the line. // @returns (series line) A new line object. _hLine(series float _fY, series color _cColor, series string sStyle, series int _iWidth) => line.new(bar_index, _fY, bar_index - 1, _fY, xloc.bar_index, extend.both, _cColor, _lineStyle(sStyle), _iWidth) // -----------------|-------------------|-------------------|-------------------|-------------------|-------------------| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -- // -- // -- calculation ////////////////////////////////////////////////////////////////////////////////////////// // -- // -- variable initialization var array<line> aLines = array.new_line() var array<float> aPrice = array.new_float() ////////////////////////////////////////////////////////////////////////////////////////// // -- // -- delete all existing lines (avoid repaint) if (array.size(aLines) > 0) for i = array.size(aLines) - 1 to 0 line.delete(array.get(aLines, i)) array.clear(aLines) array.clear(aPrice) // -----------------|-------------------|-------------------|-------------------|-------------------|-------------------| // @function Plots horizontal lines for a given step size, with overlap management. // @param _bStep (series bool) Enables or disables the plotting for this step. // @param _fStep (series float) The step size in price for the horizontal lines. // @param _iMaxLines (series int) Maximum number of lines to plot above and below the current price. // @param _cTop (series color) Color of the lines plotted above the price. // @param _sTop (series string) Style of the lines plotted above the price ('─', '┈', '╌'). // @param _iTop (series int) Width of the lines plotted above the price. // @param _cBtm (series color) Color of the lines plotted below the price. // @param _sBtm (series string) Style of the lines plotted below the price ('─', '┈', '╌'). // @param _iBtm (series int) Width of the lines plotted below the price. // @returns (void) _RoundNumbers(series bool _bStep, series float _fStep, series int _iMaxLines, series color _cTop, series string _sTop, series int _iTop, series color _cBtm, series string _sBtm, series int _iBtm) => if (_bStep) series float fStartTop_ = math.ceil(close / _fStep) * _fStep series float fStartBtm_ = math.floor(close / _fStep) * _fStep for i = 0 to _iMaxLines - 1 series float fPriceTop_ = fStartTop_ + i * _fStep series float fPriceBtm_ = fStartBtm_ - i * _fStep if (not array.includes(aPrice, fPriceTop_)) array.push(aPrice, fPriceTop_) array.push(aLines, _hLine(fPriceTop_, _cTop, _sTop, _iTop)) if (not array.includes(aPrice, fPriceBtm_)) array.push(aPrice, fPriceBtm_) array.push(aLines, _hLine(fPriceBtm_, _cBtm, _sBtm, _iBtm)) // -----------------|-------------------|-------------------|-------------------|-------------------|-------------------| ////////////////////////////////////////////////////////////////////////////////////////// // -- // -- call function for all steps _RoundNumbers(bStep1, fStep1, iMaxLines1, cTop1, sTop1, iTop1, cBtm1, sBtm1, iBtm1) _RoundNumbers(bStep2, fStep2, iMaxLines2, cTop2, sTop2, iTop2, cBtm2, sBtm2, iBtm2) _RoundNumbers(bStep3, fStep3, iMaxLines3, cTop3, sTop3, iTop3, cBtm3, sBtm3, iBtm3) _RoundNumbers(bStep4, fStep4, iMaxLines4, cTop4, sTop4, iTop4, cBtm4, sBtm4, iBtm4) // New Step 4 _RoundNumbers(bStep5, fStep5, iMaxLines5, cTop5, sTop5, iTop5, cBtm5, sBtm5, iBtm5) // New Step 5 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Roman Fedorov
Aug 2, 2025
Thanks, but can you send us the video of how it should look like?
An Anonymous User
Aug 3, 2025
An alternative could be an indicator for each level, so I could have 4-5 round number indicators on the chart, one for 1000pt level, one for 500 pt and so on. Also be ideal to be able to hide levels on certain timeframes, eg, on US30 I would not want to show 50, 250, and 500 pt levels on the daily chart. Let me know if I can help further
Steve Reed
Aug 3, 2025
Another option is this, you’d have to get the indicator to see the settings, the source code is protected, but it has MAs and sessions built in. However, the round numbers is the thing that I and some fellow grid traders desperately need - - Reid FX Round Number Lines (Forex)
Diana Zhoshko
Aug 4, 2025
Hi @Steve Reed ,
Thanks for the great idea — we’ve passed it along to the dev team and they’ll take a look!
Diana Zhoshko
Aug 4, 2025
Hi,
Thanks for the video!
We've passed your feedback on to the development team, including your request for a round numbers indicator and the ability to set precise coordinates on horizontal lines.
It's clear how both would improve workflow accuracy, especially when charting around whole number levels.