Hi,
Can anyone please help to list what all indicators are attached to a chart - their names in a text file.
Thanks
Can anyone please help to list what all indicators are attached to a chart - their names in a text file.
Thanks
Indicator List not visible in MT 6 replies
Comprehensive list of results list of MT4 EAs and indicators 0 replies
My EA and Indicator "wish list" 16 replies
MT4 help! indicator and object list 6 replies
MT4 Indicator List Problem 4 replies
DislikedHi, Can anyone please help to list what all indicators are attached to a chart - their names in a text file. ThanksIgnored
DislikedHi, Can anyone please help to list what all indicators are attached to a chart - their names in a text file. ThanksIgnored
DislikedHi Ramzam and smgclap, Sorry for the late reply. What I am looking for is a script, which when attached to a chart, will display the names of the indicators in the chart (text file or onscreen). ThanksIgnored
#include <Files\FileTxt.mqh>
void OnStart()
{
string file_name = "\\Files\\temp.tpl";
string result, xml = NULL;
CFileTxt f;
ChartSaveTemplate(0, file_name);
file_name = "temp.tpl";
f.Open(file_name, FILE_READ);
while(!f.IsEnding())
xml += f.ReadString() + " | ";
while(parse_indicator_data(xml, result))
Print(result);
}
//+------------------------------------------------------------------+
bool parse_indicator_data(string &xml, string &res)
{
string btag = "<indicator>";
string etag = "</indicator>";
int blen = StringLen(btag);
int elen = StringLen(etag);
int bpos = StringFind(xml, btag);
int epos = StringFind(xml, etag);
if(bpos < 0 || epos < 0)
return false;
int begin = bpos + blen + 1;
int count = epos - begin - 1;
res = StringSubstr(xml, begin, count);
xml = StringSubstr(xml, epos + elen + 1);
return true;
}