I am newbie , 3 weeks in the making of trading LOL.
I need a full script that will calculate the price scale range ( Max-Min), then it divides it by the pixel count of the grid then display it in chart window somewhere, and to be dynamic of course if i change scale or visible area,......
I tried to create a script for it, but when I debug it, the chart_price_min display 108 ?????
I don't know what is wrong
This won't work in debug mode because CHART_PRICE_M* returns zero in debug.
double max = ChartGetDouble(0,CHART_PRICE_MAX);
double min = ChartGetDouble(0,CHART_PRICE_MIN);
Print("max= ",max," min= ",min);
if(min > 0 && max > 0)
int height = (int)ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS);
int yBid = int(((max-Bid)/(max-min))*(double)height);
Print("height = ",height," yBid= ",yBid);