At the moment only one terminal b625 is running, 4 charts are open and no EA is applied!!
Now I started my script in debug-mode: line by line. It shall start my test_EA to check how I can set and get the chart comment - an all of a sudden I there was a sell-limit order opened.
The account is not used as it is only to get the newest mt4-builts.
What I really wanted to check is just that the script 1) opens a new chart, 2) places a comment on that new chart and 3) applies a template that will apply the test_EA
//+------------------------------------------------------------------+//| test_1.mq4 |//| Copyright 2014, MetaQuotes Software Corp. |//| https://www.mql5.com |//+------------------------------------------------------------------+#property copyright"Copyright 2014, MetaQuotes Software Corp."#property link"https://www.mql5.com"#property version"1.00"#property strict//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
//---string tEA= "test_EA";
string sy = "GBPUSD";
long chID = ChartOpen( sy, PERIOD_M1 );
string rmCmt = "IniComment from "+(string)ChartID()+" on " + sy+" with "+(string)chID;
ChartSetString( chID, CHART_COMMENT, rmCmt );
if ( !ChartApplyTemplate( chID, tEA ) ) {
Alert( "ERROR(",_LastError,"): Can't apply Template to ",sy,"?");
}
Print("Opened ",sy," >",rmCmt,"< ",(string)chID);
}
//+------------------------------------------------------------------+
OK, the test_EA should just grap the comment from the script and save it in a variable and show it:
At the moment only one terminal b625 is running, 4 charts are open and no EA is applied!!
Now I started my script in debug-mode: line by line. It shall start my test_EA to check how I can set and get the chart comment - an all of a sudden I there was a sell-limit order opened.
The account is not used as it is only to get the newest mt4-builts.
What I really wanted to check is just that the script 1) opens a new chart, 2) places a comment on that new chart and 3) applies a template that will apply the test_EA
OK, the test_EA should just grap the comment from the script and save it in a variable and show it:
I should see: s.th. like:
But I read on the chart only: another Comment another Comment another Comment\n
And that mysterious limit-order all of a sudden??
Anybody with an idea?
Gooly
tpl-file (re-named as txt)