Economic Calender  [SOLVED]

Questions about MultiCharts and user contributed studies.
alpacajack
Posts: 1
Joined: 14 Nov 2012
Has thanked: 2 times

Economic Calender

Postby alpacajack » 01 Oct 2016

This report notification program is from TS and is very useful in notifying when economic reports are about to happen. Cannot get it to verify in Multicharts.

{ history:
2014-11-12 - v1, Initial release
2014-11-13 - v1.1 Add support for TimeZone offset, Make time label optional, click to time label
add minimal-style grid layout
2014-11-20 - v1.2 Add input to IgnorePastReports; notify if no reports left; bug fixes on timer
}

Using elsystem;
Using elsystem.collections;
Using elsystem.xml;
Using elsystem.windows.forms;
using elsystem.drawing ;
using elsystem.drawingobjects ;
using elsystem.drawing ;
Using charting;

input: SymbolList(symbol);
input: ImpactFilter("High Medium" {High Medium Low});
input: TimezoneOffset(-5{-5 for Eastern});
input: TodayOnly(false);
input: IgnorePastReports(false);
input: GridLayout(1{1=standard,2=minimal});
input: Docking("right");
input: ShowTimeLabel(true);
input: ShowXML(false);
input: WarningMinutes(2);
input: TimerSize(60);
input: HighColor(yellow);
input: MediumColor(cyan);
input: LowColor(darkcyan);
input: TestReportNotify(false);
input: TestReport830(false);
input: NumberOfFlashes(2{0 for no flashing});

Vars:
XmlDocument doc(null),
Form frmPlainxml(Null), // main form
WebBrowser Browser(Null), // browser control used to get and store xls document
Vector Reports(null), // raw info
Vector FilteredReports(null), // filtered

// main form and control
Form MainForm(Null),
DataGridView DGView(Null);


{ This method gets called by EasyLanguage one time
at the beginning to create and initialize the components }
method override void InitializeComponent()
begin
self.initialized += analysistechnique_initialized;
end;

method void AnalysisTechnique_Initialized( elsystem.Object sender,
elsystem.InitializedEventArgs args )
begin
ReadXML();
end;

Method void ReadXML()
begin
// create the main form
If ShowXML then
frmPlainxml = Form.Create("Browser", 400, 1000)
else
frmPlainxml = Form.Create("Browser", 0, 0);

// create the browser control
Browser = WebBrowser.Create(frmPlainxml.width,frmPlainxml.height);
Browser.DocumentCompleted += OnDocumentCompleted;
frmPlainxml.AddControl(Browser);

// show the form
frmPlainxml.Show();

// navigate to the report
Browser.ScriptErrorsSuppressed = TRUE;
Browser.Navigate("<a href="javascript:showDisclaimer('http://www.forexfactory.com/
ff_calendar_thisweek.xml')">http://www.forexfactory.com/ff_calendar_thisweek.xml</a>");

end;

// method called when the document finishes loading
Method void OnDocumentCompleted(Object sender, WebBrowserDocumentCompletedEventArgs args)
vars: Vector vv, string rawxml,
XmlDocument xmldoc, XmlNodeList nodes, xmlnode Node, XmlNode node2, XmlNode node3,
elsystem.DateTime dtReport,
string szTitle, string szCountry, string szDate, string szTime, string szImpact;
Begin
once begin
// The browser has done it's job, maybe hide it
Browser.Visible = ShowXML;
frmPlainxml.Visible = ShowXML;

rawxml = browser.documenttext;

try
xmldoc = New XmlDocument(); // instantiate an xml document
xmldoc.LoadXml(rawxml); // load in the xml string

Reports = New vector;
FilteredReports = New vector;

nodes = xmlDoc.ChildNodes;
node = nodes.Item(1); // bypass the descriptor

node2 = node.FirstChild;
While node2 <> Null begin
node3 = node2.FirstChild;
szTitle = node3.InnerText;

node3 = node3.NextSibling;
szCountry = node3.InnerText;

node3 = node3.NextSibling;
szDate = InsideCdata(node3.OuterXml);

node3 = node3.NextSibling;
szTime = InsideCdata(node3.OuterXml);

node3 = node3.NextSibling;
szImpact = InsideCdata(node3.OuterXml);

node3 = node3.NextSibling;
node3 = node3.NextSibling;
node3 = node3.NextSibling;

dtReport = New datetime;
dtReport.tryparse(szDate + " " + szTime, dtReport);
If node3 <> Null then
Raiseruntimeerror("XLS not structured for this indicator");

dtReport.AddHours(TimezoneOffset);

vv = New vector;
vv.push_back(szTitle);
vv.push_back(szCountry);
vv.push_back(dtReport);
vv.push_back(szImpact);
Reports.push_back(vv);

node2 = node2.NextSibling;
end;

FilterItems();

catch (Exception ex)
Print(ex.Message);
end;
end;
end;

Method string InsideCdata(string ss)
vars: int i1, int i2, string sss;
Begin
i1 = instr(ss,"CDATA[")+strlen("CDATA[");
i2 = instr(ss,"]");
sss = midstr(ss,i1,i2-i1);
Return sss;
end;

const: darker(.5);
Method void FilterItems()
var: int ii, int ij, int ik, string strTitle, string strCountry, datetime dtReport, datetime dtReport1, string strImpact,
vector vv, Color forecolr, Color backcolr,
DataGridViewRow row, DataGridViewColumn dgvcol,
Timer timr, DateTime dt, timespan ts, int totalmins, int totalhrs, int totalsecs, int intrvl;
begin
try
If LastBarOnChartEX then once Begin
// create the form and its grid control
MainForm = Form.Create("Reports", 325, 300);
//MainForm.Resize += OnResize;

DGView = DataGridView.Create(0, 0);
DGView.Dock = DockStyle.fill;
DGView.GradientMode = LinearGradientMode.none;
DGView.ColumnHeadersVisible = false;
DGView.RowHeadersVisible = false;
//DGView.CellClick += OnCellClick;

// will show three columns: view, date, country, filing title
dgvcol = DataGridViewColumn.Create("Prio");
dgvcol.Width = oo_iff(Gridlayout=1,50,0) astype int;
DGView.Columns.Add(dgvcol);

dgvcol = DataGridViewColumn.Create("Time");
dgvcol.Width = 85;
DGView.Columns.Add(dgvcol);

dgvcol = DataGridViewColumn.Create("Country");
dgvcol.Width = oo_iff(Gridlayout=1,33,0) astype int;
DGView.Columns.Add(dgvcol);

dgvcol = DataGridViewColumn.Create("Summary");
dgvcol.Width = 5000;
DGView.Columns.Add(dgvcol);

MainForm.AddControl(DGView);

switch Docking begin
case "right": MainForm.Dock = dockstyle.right;
Case "left": MainForm.Dock = dockstyle.left;
case "top": MainForm.Dock = dockstyle.top;
Case "bottom": MainForm.Dock = dockstyle.bottom;
default: ; MainForm.Height = 800;
end;

MainForm.Show();

// insert optional test items
If TestReportNotify then begin
strTitle = "Primary Test Report"; //vv[0] astype string;
strCountry = "USD"; //vv[1] astype string;
dtReport = datetime.now; //vv[2] astype datetime;
dtReport.AddMinutes(WarningMinutes + 1);
strImpact = "High"; //vv[3] astype string;
vv = New vector;
vv.push_back(strTitle);
vv.push_back(strCountry);
vv.push_back(dtReport);
vv.push_back(strImpact);
vv.push_back(new timer);
FilteredReports.push_back(vv);
vv = New vector;
vv.push_back("Secondary Test Report");
vv.push_back(strCountry);
vv.push_back(dtReport);
vv.push_back(strImpact);
vv.push_back(new timer);
FilteredReports.push_back(vv);
end;
If TestReport830 then begin
strTitle = "Generic 830 report";
strCountry = "USD"; //vv[1] astype string;
dtReport = datetime.now; //vv[2] astype datetime;
dtReport.Hour = 8;
dtReport.Minute = 30;
dtReport.Second = 0;
strImpact = "High"; //vv[3] astype string;
vv = New vector;
vv.push_back(strTitle);
vv.push_back(strCountry);
vv.push_back(dtReport);
vv.push_back(strImpact);
vv.push_back(new timer);
FilteredReports.push_back(vv);
end;

For ii = 0 to reports.Count - 1 begin
vv = reports[ii] astype vector;
strTitle = vv[0] astype string;
strCountry = vv[1] astype string;
dtReport = vv[2] astype datetime;
strImpact = vv[3] astype string;
vv.push_back(new timer);

if IgnorePastReports = false or dtReport > elsystem.datetime.now then
If not TodayOnly or dtReport.ELDate = elsystem.datetime.now.ELDate then
if dtReport.ELDate >= elsystem.datetime.now.ELDate then
If instr(SymbolList,strCountry) > 0 and instr(ImpactFilter,strImpact) > 0 then begin
FilteredReports.push_back(vv);
end;

end;

if FilteredReports.count = 0 then begin
// no reports
row = DataGridViewRow.Create(strTitle);
DGView.Rows.Add(row);
backcolr = Color.FromArgb(25, 25, 25);
forecolr = color.white;
row.Cells[3].Text = "<no reports>";
row.cells[3].Font = Font.Create("Arial", 8, FontStyle.bold);
row.Cells[1].Text = upperstr(datetime.today.Format("%A"));
row.cells[1].Font = Font.Create("Arial", 9, FontStyle.bold);
For ij = 0 to 3 begin
row.cells[ij].BackColor = backcolr;
row.cells[ij].ForeColor = forecolr;
end;
end;

// Put filtered reports into grid and set timers
dtReport1.tryparse("Jan 1, 1970", dtReport1);
//once print("===========",datetime.now.tostring());
For ii = 0 to FilteredReports.Count - 1 begin
vv = FilteredReports[ii] astype vector;
strTitle = vv[0] astype string;
strCountry = vv[1] astype string;
dtReport = vv[2] astype datetime;
strImpact = vv[3] astype string;
ts = ((dtReport - datetime.now) astype timespan);

//if dtReport > datetime.now then
//print("Check Report: ",dtReport.tostring()," @",mod(ts.TotalHours,24):2:0,":",mod(ts.TotalMinutes,60):2:0,":",mod(ts.totalseconds,60):2:0,"@ ",strTitle);

// set timers
if dtReport > datetime.now then
If dtReport <> dtReport1 then begin
timr = New timer;
ts = dtreport - datetime.now;
intrvl = ts.totalmilliseconds astype int;
timr.Interval = intrvl - 60 * 1000 * WarningMinutes; //millisecs ;
//print(dtreport.format("%H:%M:%S "),datetime.now.format("%H:%M:%S "),"intrvl=",intrvl*.001:5:0,", secs=",timr.interval*.001:5:0);

//totalsecs = timr.Interval * .001;
//totalmins = intportion(totalsecs / 60);
//totalhrs = intportion(totalmins / 60);
//print("SetTimer: "," @",mod(totalhrs,24):2:0,":",mod(totalmins,60):2:0,"@ ",strTitle);

timr.AutoReset = false ;
timr.Enable = true ;
timr.elapsed += Timer_Flasher;
timr.Start();
vv[4] = timr;
end;

// Populate grid

// Insert Day of Week
If dtReport1.ELDate <> dtReport.ELDate then begin
row = DataGridViewRow.Create("");
DGView.Rows.Add(row);
backcolr = Color.FromArgb(25, 25, 25);
forecolr = color.white;
row.Cells[1].Text = upperstr(dtReport.Format("%A"));
row.cells[1].Font = Font.Create("Arial", 9, FontStyle.bold);
For ij = 0 to 3 begin
row.cells[ij].BackColor = backcolr;
row.cells[ij].ForeColor = forecolr;
end;
end;
dtReport1 = dtReport;

row = DataGridViewRow.Create(strTitle);
DGView.Rows.Add(row);

row.Cells[0].Text = strImpact;
row.Cells[1].Text = dtReport.Format("%m/%d %H:%M");
row.Cells[2].Text = strCountry;
row.Cells[3].Text = strTitle;
row.cells[0].Font = Font.Create("Arial", 8, FontStyle.bold);
row.cells[1].Font = Font.Create("Arial", 8, FontStyle.bold);
row.cells[2].Font = Font.Create("Arial", 8, FontStyle.bold);
row.cells[3].Font = Font.Create("Arial", 8, FontStyle.bold);
If (elsystem.Datetime.Now.ELDate = dtReport.ELDate) then begin
switch strImpact begin
Case "Low": forecolr = color.FromArgb(getRvalue(LowColor),getGvalue(LowColor),getBvalue(LowColor) );
Case "Medium": forecolr = color.FromArgb(getRvalue(MediumColor),getGvalue(MediumColor),getBvalue(MediumColor) );
Case "High": forecolr = color.FromArgb(getRvalue(HighColor),getGvalue(HighColor),getBvalue(HighColor) );
default: forecolr = color.FromArgb(getRvalue(HighColor),getGvalue(HighColor),getBvalue(HighColor) );
end;
backcolr = color.black;
end else begin
switch strImpact begin
Case "Low": forecolr = color.FromArgb(darker*getRvalue(LowColor),darker*getGvalue(LowColor),darker*getBvalue(LowColor) );
Case "Medium": forecolr = color.FromArgb(darker*getRvalue(MediumColor),darker*getGvalue(MediumColor),darker*getBvalue(MediumColor) );
Case "High": forecolr = color.FromArgb(darker*getRvalue(HighColor),darker*getGvalue(HighColor),darker*getBvalue(HighColor) );
default: forecolr = color.FromArgb(darker*getRvalue(HighColor),darker*getGvalue(HighColor),darker*getBvalue(HighColor) );
end;
backcolr = Color.FromArgb(25, 25, 25);
end;
For ij = 0 to 3 begin
row.cells[ij].BackColor = backcolr;
row.cells[ij].ForeColor = forecolr;
end;
end;
end;
Catch (Exception ex);
print("FilterItems Reports: ",ex.Message);
end;
end;

method void Timer_Flasher( Object sender, TimerElapsedEventArgs args )
var: int han, string ss, int ii, Timer timr, vector vv,
string strTitle, string strCountry, datetime dtReport, string strImpact,
TextLabel lblTime;
begin
try
If not ShowTimeLabel then
return;

For ii = 0 to FilteredReports.Count - 1 begin
vv = FilteredReports[ii] astype vector;
strTitle = vv[0] astype string;
strCountry = vv[1] astype string;
dtReport = vv[2] astype datetime;
strImpact = vv[3] astype string;
timr = vv[4] astype timer;

If sender = timr then begin
//print("EconomicReports: Timer_Flasher: ",datetime.now.tostring(),", ",strTitle);
If vv.Count = 5 then begin
oo_FlashString(XYPoint.Create(10,200),
oo_iffs(time<1000,rightstr(elsystem.Datetime.Now.Format("%H:%M:%S"),7),
elsystem.Datetime.Now.Format("%H:%M:%S")),
white,Font.Create( "Arial", TimerSize, FontStyle.bold ),lblTime,
500, true, NumberOfFlashes);
vv.push_back(lblTime);
timr.Interval = 1000; // update timer every second
timr.AutoReset = true ;
timr.Start();
end else if elsystem.datetime.now <= dtReport then begin
lblTime = vv[5] astype textlabel;
lblTime.TextString = oo_iffs(time<1000,rightstr(elsystem.Datetime.Now.Format("%H:%M:%S"),7),
elsystem.Datetime.Now.Format("%H:%M:%S"));
end else begin
//print("...timer done");
If timr.Enable then begin
lblTime = vv[5] astype textlabel;
lblTime.TextString = "!!!" + oo_iffs(time<1000,rightstr(elsystem.Datetime.Now.Format("%H:%M:%S"),7),
elsystem.Datetime.Now.Format("%H:%M:%S"));
//print("Removing ",lblTime.TextString, ", ",datetime.now.format("%M:%S"));
DrawingObjects.Delete(lblTime);
vv[5] = null;
timr.Enable = false ;
timr.AutoReset = false;
timr.stop();
end;
end;
end;
end;
Catch (Exception ex);
print("Timer_Flasher: ",ex.message);
end;
end;

// FLASHERS
// nb: this code has features that are not needed for this app, but
// it was easier just to cut and paste the whole thing

Method double oo_iff( bool q, double valu1, double valu2 ) begin if q then return valu1 else return valu2; end;
Method string oo_iffs( bool q, string str1, string str2 ) begin if q then return str1 else return str2; end;

var: winsep(15);
var: vector rhsobjects(null);
Method void oo_PlotString(DOPoint pnt, string ss, int colr, Font fnt, Out textlabel lbl)
var: Vector vv, BNPoint bn, XYPoint xy, DTPoint dt;
begin
try
If pnt istype XYPoint then begin
xy = pnt astype xypoint;
If lbl = Null then begin
lbl = TextLabel.Create( xy, ss );
lbl.hstyle = HorizontalStyle.left;
lbl.vstyle = VerticalStyle.top;
lbl.Persist = true ;
DrawingObjects.Add( lbl ) ;
End else begin // just adjust
lbl.points[0] = xy;
lbl.TextString = ss;
end;
end Else if pnt istype BNPoint then begin
If (pnt astype BNPoint).barnumber > 6 then begin
bn = bnpoint.create((pnt astype bnpoint).barnumber + maxbarsback,
(pnt astype bnpoint).price);
If lbl = Null then begin
lbl = TextLabel.Create( bn, ss );
lbl.hstyle = HorizontalStyle.right;
lbl.vstyle = VerticalStyle.center;
If (pnt astype bnpoint).barnumber > Currentbar + winsep
{+ maxbarsback} then begin
rhsobjects.push_back(lbl);
end;
lbl.Persist = true ;
DrawingObjects.Add( lbl ) ;
End else begin // just adjust
lbl.points[0] = bn;
lbl.TextString = ss;
end;
end;
end Else if pnt istype DTPoint then begin
dt = dtpoint.create((pnt astype dtpoint).datetimeofbar,(pnt astype dtpoint).price);
If lbl = Null then begin
lbl = TextLabel.Create( dt, ss );
lbl.hstyle = HorizontalStyle.right;
lbl.vstyle = VerticalStyle.center;
lbl.Persist = true ;
DrawingObjects.Add( lbl ) ;
End else begin // just adjust
lbl.points[0] = dt;
lbl.TextString = ss;
end;
End else begin
print("oo_plotstring: unknown DOpoint type");
end;
lbl.TextString = ss;
lbl.Font = fnt; //Font.Create( "Arial", 20, FontStyle.bold ) ;
lbl.Color = color.FromArgb(getRvalue(colr),getGvalue(colr),getBvalue(colr) );
//lbl.Click += OnClick_DeleteText ;

catch( Exception ex);
print("oo_plotstring: ",ex.Message);
end; // try

end ;

var: Vector MyFlashers(null);
{enum} const: _flshTimer(0), _flshPnt(1), _flshString(2), _flshColor(3), _flshHan(4),
_flshCount(5), _flshOnOff(6), _flshDuration(7), _flshStayOn(8), _flshEnumLast(11);

Method vector oo_FlashString(DOPoint pnt, string ss, int colr, Font fnt, Out textlabel lbl,
int millisecs, Bool stayon, int flashnum)
var: BNPoint bn, Timer tmr, Vector flsh, int ii;
begin
// returns the flasher

If MyFlashers = Null then
MyFlashers = New vector;

flsh = null;

// If label is already created, remove it and destroy the associated flasher info
if lbl <> Null then begin
For ii = 0 to MyFlashers.Count - 1 begin
flsh = MyFlashers[ii] astype vector;
If flsh[_flshHan] astype TextLabel = lbl then begin
MyFlashers.erase(ii);
break;
end;
flsh = null;
end;
drawingobjects.delete(lbl);
end;

// Create label
If pnt istype XYPoint then begin
lbl = TextLabel.Create( pnt astype XYPoint, ss );
lbl.hstyle = HorizontalStyle.left;
lbl.vstyle = VerticalStyle.top;
end Else if pnt istype BNPoint then begin
bn = bnpoint.create((pnt astype bnpoint).barnumber + maxbarsback,(pnt astype bnpoint).price);
lbl = TextLabel.Create( bn, ss );
lbl.hstyle = HorizontalStyle.right;
lbl.vstyle = VerticalStyle.center;
end;
lbl.TextString = ss;
lbl.Font = fnt;
lbl.Color = color.FromArgb(getRvalue(colr),getGvalue(colr),getBvalue(colr) );
lbl.Persist = true ;
lbl.Tag = "xml report";
lbl.Click += OnClick_ReportTime ;

DrawingObjects.Add( lbl ) ;

// Init the timer
tmr = new Timer;
tmr.Interval = millisecs ;
tmr.AutoReset = true ;
tmr.Enable = true ;
tmr.elapsed += FlashTimer_Flasher;

// Setup the flasher
flsh = new vector;
flsh.insert(0, _flshEnumLast, 0);
flsh[_flshTimer] = tmr;
flsh[_flshPnt] = pnt;
flsh[_flshString] = ss;
flsh[_flshColor] = colr;
flsh[_flshHan] = lbl;
flsh[_flshCount] = FlashNum; // -1 implies continuous
flsh[_flshOnOff] = true;
flsh[_flshStayOn] = stayon;
MyFlashers.push_back(flsh);

Return flsh;
end ;

method void FlashTimer_Flasher( Object sender, TimerElapsedEventArgs args )
var: int han, string ss, int ii, Vector flshr, int bb;
begin
try
// find this flasher
For ii = 0 to MyFlashers.Count - 1 begin
flshr = MyFlashers[ii] astype vector;
If flshr[_flshTimer] astype Timer = sender then
break;
end;
If flshr[_flshTimer] astype Timer <> sender then begin // just in case...
(sender astype timer).Enable = false;
return;
end;

Switch flshr[_flshOnOff] astype bool begin
Case true: // was on, so turn off
If flshr[_flshCount] astype int <> 0 then
drawingobjects.delete(flshr[_flshHan] astype TextLabel);

Case false: // was off, so show the string, decrement counter
drawingobjects.add(flshr[_flshHan] astype TextLabel);
flshr[_flshCount] = flshr[_flshCount] astype int - 1;
If flshr[_flshCount] astype int = 0 then begin
(sender astype timer).Enable = false;
MyFlashers.erase(ii); // remove item vector
end;
end;
flshr[_flshOnOff] = not flshr[_flshOnOff] astype bool;

If flshr[_flshCount] astype int = 0 then
If flshr[_flshStayOn] astype bool = false then begin
drawingobjects.delete(flshr[_flshHan] astype TextLabel);
end;

Catch (Exception ex);
print("FlashTimer_Flasher: ",ex.Message);
(sender astype timer).Enable = false;
end; { try }
end ;

method void MenuItem_Remove_Clicked(Object sender, EventArgs args)
var: int ii, int ij, Timer timr, vector vv,
string strTitle, string strCountry, datetime dtReport, string strImpact,
TextLabel lblTime;
Begin
try
// nb: sender.tag has the vector

vv = (sender astype MenuItem).tag astype vector;
lblTime = vv[5] astype textlabel;
timr = vv[4] astype timer;
If timr.Enable then begin
lblTime = vv[5] astype textlabel;
//lblTime.TextString = "!!!" + oo_iffs(time<1000,rightstr(elsystem.Datetime.Now.Format("%H:%M:%S"),7),elsystem.
Datetime.Now.Format("%H:%M:%S"));
lblTime.TextString = ""; // this is a kludge... if the Remove comes in while its still Flashing, the label isn't actuall removed from the chart, so make it blank
DrawingObjects.Delete(lblTime);
vv[5] = null;
timr.Enable = false ;
timr.AutoReset = false;
timr.stop();
end;
Catch (Exception ex);
print("MenuItem_Remove_Clicked: ", ex.Message);
end;
End;

method void OnClick_ReportTime( Object sender, DrawingObjectEventArgs args )
var: int ii, int ij, Vector vv, Vector vv2, Vector vv3, string strTitle, string strCountry, datetime dtReport, string strImpact, timer timr,
datetime dtThisReport,
ContextMenu menu, MenuItem item, TextLabel lbl;
begin
try
menu = ContextMenu.Create();

For ii = 0 to FilteredReports.Count - 1 begin
vv = FilteredReports[ii] astype vector;
If vv.Count = 6 then begin
// Find this label
vv = FilteredReports[ii] astype vector;
//strTitle = vv[0] astype string;
//strCountry = vv[1] astype string;
dtThisReport = vv[2] astype datetime;
//strImpact = vv[3] astype string;
//timr = vv[4] astype timer;
//lbl = vv[5] astype TextLabel;
//If sender astype TextLabel = lbl then begin
If sender astype TextLabel = vv[5] astype TextLabel then begin
// Find all the reports with this datetime
For ij = 0 to FilteredReports.Count - 1 begin
vv2 = FilteredReports[ij] astype vector;
strTitle = vv2[0] astype string;
//strCountry = vv2[1] astype string;
dtReport = vv2[2] astype datetime;
strImpact = vv2[3] astype string;
if dtReport = dtThisReport then begin
item = MenuItem.Create(dtReport.format("%H:%M") + " " + strImpact + " - " + strTitle);
menu.MenuItems.Add(item);
If vv2.Count = 6 then begin
vv3 = vv2;
lbl = vv3[5] astype TextLabel;
end;
end;
end;
end;
end;
end;
item = MenuItem.Create("-");
menu.MenuItems.Add(item);
item = MenuItem.Create("Remove");
item.Click += MenuItem_Remove_Clicked;
item.Tag = vv3;
menu.MenuItems.Add(item);

menu.Show(Cursor.Position);

Catch (Exception ex);
print("OnClick_ReportTime: ", ex.Message);
end;
end;

// CONTINUE

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Economic Calender

Postby TJ » 01 Oct 2016

See post #1 and post #2
viewtopic.php?f=16&t=11713

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Economic Calender  [SOLVED]

Postby TJ » 01 Oct 2016



Return to “MultiCharts”