I've been tracking things down and I think the function below is what needs changing to do what I require.
which is to add TF to the trade levels
How do I add this - TF code
===========================>
Code: Select all
ENUM_TIMEFRAMES ChartPeriod(
long chart_id=0 // Chart ID
);
<==========================
To this show trade levels function ?
==========================>
Code: Select all
CHART_SHOW_TRADE_LEVELS — property of displaying trade levels on the chart (levels of open orders, Stop Loss, Take Profit and pending orders).
//+---------------------------------------------------------------------+
//| The function defines if trading levels are displayed on the chart. |
//+---------------------------------------------------------------------+
bool ChartShowTradeLevelsGet(bool &result,const long chart_ID=0)
{
//--- prepare the variable to get the property value
long value;
//--- reset the error value
ResetLastError();
//--- receive the property value
if(!ChartGetInteger(chart_ID,CHART_SHOW_TRADE_LEVELS,0,value))
{
//--- display the error message in Experts journal
Print(__FUNCTION__+", Error Code = ",GetLastError());
return(false);
}
//--- store the value of the chart property in memory
result=value;
//--- successful execution
return(true);
}
//+------------------------------------------------------------------+
//| The function enables/disables trading levels display mode. |
//+------------------------------------------------------------------+
bool ChartShowTradeLevelsSet(const bool value,const long chart_ID=0)
{
//--- reset the error value
ResetLastError();
//--- set property value
if(!ChartSetInteger(chart_ID,CHART_SHOW_TRADE_LEVELS,0,value))
{
//--- display the error message in Experts journal
Print(__FUNCTION__+", Error Code = ",GetLastError());
return(false);
}
//--- successful execution
return(true);
}