Change scale price max and min using CChartObjectSubChart

 

Pls,


I not have sucess changing price max and min in sub charts creteds using CChartObjectSubChart.

Help me.



 
Scale prices
 
Marcio Andrade:

Pls,


I not have sucess changing price max and min in sub charts creteds using CChartObjectSubChart.

Help me.



Post your code and say what’s not working and somebody might help otherwise nobody can
 

Hi,


I not have code to access the property, searching this code.


I have big number of if and not sucess.


To creat chart is simple;


#include             <ChartObjects\ChartObjectSubChart.mqh>
                                                   CChartObjectSubChart          *m_chart[];                            // chart CChartObjectSubChart objetct


//....



   //--- create
   m_chart[i].Create(ChartID(),name,0,x_pos,y_pos,x_size,y_size);
   m_chart[i].Symbol(m_symbol.name);                              // Symbol
   m_chart[i].Period(PERIOD_M1);                                  // Period
   m_chart[i].Corner(CORNER_LEFT_UPPER);                          // Anchoring corner
   m_chart[i].Scale(scale);                                       // Scale
   m_chart[i].DateScale(false);                                   // Time scale display
   m_chart[i].PriceScale(false);                                  // Price scale display


Necessary change price of this property in m_charts pointers.

   //--- max price of chart
   double chart_price_max = ChartGetDouble(ChartID(), CHART_PRICE_MAX, 0);
   //--- min price of chart
   double chart_price_min = ChartGetDouble(ChartID(), CHART_PRICE_MIN, 0);

Help me.

 
resolved.