TradeProofer Show Spread Expert Advisor

TradeProofer’s latest expert advisor displays the spread on the chart at all times. Simply add the expert to a chart, input the desired text font & colour, and enjoy the ease of seeing the spread!

TradeProofer’s expert shows the spread of the current chart.

For those of you MQL4 wizz’s the code used is below. Feel free to implement this into your own expert advisors!
//————–CODE START————
input color inpcolor = clrAquamarine;
input string inpfont = “Impact”;

void OnTick()
{
double spread = MarketInfo(_Symbol,MODE_SPREAD);
ObjectCreate(“name”,OBJ_LABEL,0,0,0);
ObjectSet (“name”,OBJPROP_CORNER,CORNER_RIGHT_UPPER);
ObjectSet(“name”,OBJPROP_XDISTANCE,30);
ObjectSet(“name”,OBJPROP_YDISTANCE,30);
ObjectSetText(“name”,”SPREAD: “+ spread,20,inpfont,inpcolor);
}
//————-CODE END——————

Leave a Reply

Your email address will not be published. Required fields are marked *