MQL5 Indicator - Sizing indicator sub-window New comment Anthony Garot 2018.06.04 01:19 I am building an indicator that I want to be full-screen. The underlying price-bars do not matter because this is multi-currency. I am able to size the window dynamically using the following code, and it works, but it feels "ugly" to me. int OnInit() { const int MAIN_WINDOW = 0; const int SUB_WINDOW = 1; long heightMain = ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,MAIN_WINDOW); long heightSub = ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,SUB_WINDOW); PrintFormat("MAIN_WINDOW height [%d]", (int) heightMain); PrintFormat("SUB_WINDOW height [%d]", (int) heightSub); ChartSetInteger(0,CHART_HEIGHT_IN_PIXELS,SUB_WINDOW,heightMain + heightSub); . . . } The range of the indicator values is -20 to +20, which do not correspond to the MAIN_WINDOW chart prices; so, I did not use #property indicator_chart_window Question: Is there a better way to do this? Using #property indicator_chart_window A multitime tester? I think a lot of people could use it... Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. New comment
I am building an indicator that I want to be full-screen. The underlying price-bars do not matter because this is multi-currency.
I am able to size the window dynamically using the following code, and it works, but it feels "ugly" to me.
The range of the indicator values is -20 to +20, which do not correspond to the MAIN_WINDOW chart prices; so, I did not use #property indicator_chart_window
Question: Is there a better way to do this?