Draw Spread free

by gorin in category Other at 05/09/2013

Spread is the difference between the bid and the ask price of the symbol.

This indicator draws Spread on the chart in pips.

How to install
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class DrawSpread : Indicator
        public override void Calculate(int index)
            if (IsLastBar)

        private void DisplaySpreadOnChart()
            var spread = Math.Round(Symbol.Spread / Symbol.PipSize, 2);
            string text = string.Format("{0}", spread);
            ChartObjects.DrawText("Label", "Spread:", StaticPosition.TopLeft, Colors.Yellow);
            ChartObjects.DrawText("spread", "\t" + text, StaticPosition.TopLeft, Colors.White);

cmureza - February 11, 2014 @ 17:47


the number of spread is inside the word "spread" and i can't read it

please help

aisaac - April 18, 2014 @ 14:29

this indicator in my graph not seen spread level.


aisaac - April 18, 2014 @ 14:54

ok solved the problem, i change the text.PadLeft(12), in text.PadLeft(19),  line 36 editor.

ThePhantomRaven - May 19, 2014 @ 17:59

This is very useful and simplest indicator ever for scalpers.

Nice idea.

k90211lee - September 20, 2015 @ 00:51

Simple and very useful indicator. I use it with MT4.  I'm glad I found it here. :)

I use grey back ground chart, like to change the font and spread to red to more visual.  I can't change red it above code.  Thank you in advance!


socalfxtrader - July 07, 2016 @ 01:21

Thank you Gorin. Very useful indicator.

Is anyone aware of an indicator that can draw the ATR in pips (in the same way this "draw spread" indicator works)? 

I like to remove as much noise and have the least amount of oscillators / indicators beneath my charts. 


WakasKhan - November 22, 2019 @ 01:34

Very useful indicator, but can u please allow the option to have it displayed at the top centre rather than top left. 


Thank you 

khoshroomahdi - June 18, 2021 @ 16:54

Please add color parameter. enable $disable label, position on chart parameter