i test this code to serach in all my symbols and find ichimoku crosses but i have error
#include <Indicators/Trend.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
CPositionInfo m_position; // trade position object
CTrade m_trade; // trading object
CSymbolInfo m_symbol; // symbol info object//--- input parametersinputint InpTenkanSen = 9; // Ichimoku: period of Tenkan-sen inputint InpKijunSen = 26; // Ichimoku: period of Kijun-sen inputint InpSenkouSpanB = 52; // Ichimoku: period of Senkou Span B int handle_iIchimoku; // variable for storing the handle of the iIchimoku indicatordouble iIchimokuGet(constint buffer,constint index)
{
double Ichimoku[1];
//--- reset error code ResetLastError();
//--- fill a part of the iIchimoku array with values from the indicator buffer that has 0 index if(CopyBuffer(handle_iIchimoku,buffer,index,1,Ichimoku)<0)
{
//--- if the copying fails, tell the error code PrintFormat("Failed to copy data from the iIchimoku indicator, error code %d",GetLastError());
//--- quit with zero result - it means that the indicator is considered as not calculated return(0.0);
}
return(Ichimoku[0]);
}
double TENKANSEN_LINE_0 = iIchimokuGet(TENKANSEN_LINE,0);
double KIJUNSEN_LINE_0 = iIchimokuGet(KIJUNSEN_LINE,0);
double SENKOUSPANA_LINE_0 = iIchimokuGet(SENKOUSPANA_LINE,0);
double SENKOUSPANB_LINE_0 = iIchimokuGet(SENKOUSPANB_LINE,0);
double TENKANSEN_LINE_1 = iIchimokuGet(TENKANSEN_LINE,1);
double KIJUNSEN_LINE_1 = iIchimokuGet(KIJUNSEN_LINE,1);
//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
//---for(int i=0;i<SymbolsTotal(1);i++)
{
if(TENKANSEN_LINE_0>KIJUNSEN_LINE_0 && TENKANSEN_LINE_1<=KIJUNSEN_LINE_1){
Print("SYMBOL: ",SymbolName(i,1)," Found At: ",i);}
}
}
i test this code to serach in all my symbols and find ichimoku crosses but i have error