Errors, bugs, questions - page 1738

 
SergeySarkisyan:
Hello everyone. There's this weird indentation at the bottom and I can't get it to go away.

This space is reserved for showing volumes:

volumes

 
Karputov Vladimir:

This space is reserved for showing volumes:

It would be better if they reserved space for news labels, because they make it really hard to see the bottom of the chart, especially when that's where price is trading. And when removed they are restored again after some time. And how to turn them off I have not found.
 
SergeySarkisyan:
Hi all. This obscure indentation at the bottom has popped up and I can't get it out of the way.
You could write an automatic scaling indicator. Then everyone would have it the way they want it.
 
Alexey Viktorov:
))))))) and promote your blog ))))))))
From the blog entries are shown in the newsfeed and you can pin them to your profile
 
BlackTomcat:
It would be better to reserve space for news marks, because they are a real nuisance to look at the lower part of the chart, especially when the price is traded there. And when they are removed, they are restored again after some time. And how to disable them I have not found.

You can manually change the vertical scale: hover the mouse pointer over the prices, LKM and drag...

 
Karputov Vladimir:

This space is reserved for showing volumes:

That's what I thought. That's not good. And there's no other way but to write an indicator?

 
Alexey Kozitsyn:

You can manually change the vertical scale: hover the mouse over the prices, LKM and pull...

Pull as hard as I can) The gap is still there

 
Alexey Kozitsyn:

You can manually change the vertical scale: move the mouse pointer over the prices, LKM and drag...

Thanks, I'll give it a try when I get home. But I actually have a laptop and use the touchpad. Therefore, some manipulations that are easy to perform with a mouse, on the touchpad turns into an acrobatic trick. And then there are tablets...
In principle, I can set a fixed scale via chart properties and thus get a free field at the bottom. But autoscaling is much more convenient, if, for example, the price is constantly going down (up) and updates lows (highs) almost on every tick. And recent events in the pound show that such movements can be very deep and very fast - there is no time to change the scale. :)
 
SergeySarkisyan:

Pulling as hard as I can) The gap is still there

No, no, the answer is not for you... It won't help you...
 

Who knows how to get the parameters of a non-current chart? The thing is, everything works fine as long as the current chart is active. But if I switch to another one, the events don't come and I can't get the current information via ChartGet.

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---
   if(id==CHARTEVENT_CHART_CHANGE)
     {
      printf("chart height: %i",ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS));
     }
  }

It turns out that only the active chart is rendered, or is there a way around it?

Update: I have partially solved the problem by forced redrawing, it is possible to detectchart resizing, but ChartXYToTimePrice returns not quite correct data - if I open the required chart manually, everything works as it should. I have not yet found out why.

long currChart=ChartFirst();
   while(currChart>=0)
     {
      ChartSetInteger(currChart,CHART_BRING_TO_TOP,true);
      ChartRedraw(currChart);
      currChart=ChartNext(currChart);
     }

upd. Another question, how to determine whether the current chart is active, i.e. has a focus?

upd... Figured it out.

long hWnd = ChartGetInteger(0, CHART_WINDOW_HANDLE);
int parent = GetParent(GetParent(hWnd));

int active = SendMessageW(parent, WM_MDIGETACTIVE, 0, 0); // хэндл активного окна


Reason: