Cintinuing.
My code looks like
t = new TicketData(ticketNum, _symbol);
meth.tickets.Add(ticketNum, t);
tradeList.Add(ticketNum, t); In my EA's OnInit(), I have code to Clear the tradeList:
tradeList.Clear();
I only have ONE call to tradeList.Add in my entire EA.
I set a breakpoint on the tradeList.Add line and 2 lines before that.
I run the EA in debug and when it hits the breakepoint 2 lines before the tradList.Add line for the 1st time, the Watch window says that the tradeList already has an m_count = 1.
How is this possible? Are the breakpoints and Watch list working properly?
If my code did NOT put the 1 entry into tradeList, how did it get there?
How can I trust the MetaEditor debugging?
Place break point in CHashMap::Add. Can also place a debug message.
In addition
2. Check count at the beginning of OnTick
3. Print the ticketid from hash map when count is 1
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a variable tradeList that is declared as:
I have only 1 line that does a .Add to the list. The code looks like: