Check trades count not working properly, allows too many trades with multiple charts open
-
Compare = ">";
CompareCount = 3;
GroupMode = "group";
Group = "";
MarketMode = "market";
Market = CurrentSymbol();
BuysOrSells = "both";
LimitsOrStops = "both";
Seems 'market' should equal 'all markets' if "any market" is specified in the logic block. -
Those are the default values. Each block was made by 1 class in the output code and some parameters are set in the constructor, but the values might be changed from the instance of the class - this is somewhere else in the code.
So the problem might be something else.
-
How can you have Market = CurrentSymbol();
When the logic block specifies Any Market?
I suppose the most important point is: Does Any Market in this logic block mean "Any forex pair you have the EA running with the same magic number? If not can you provide an example? -
I already said that, but you are showing me piece of code that comes from the constructor of a class. These values are some initial values and they could be changed. The actual values are written in other place, for example:
// Block 2 (Check trades count) class Block1: public MDL_CheckTradesCount<string,int,string,string,string,string,string,string> { public: /* Constructor */ Block1() { __block_number = 1; __block_user_number = "2"; _beforeExecuteEnabled = true; // Block input parameters MarketMode = "all"; } public: /* Callback & Run */ virtual void _callback_(int value) { } virtual void _beforeExecute_() { Market = CurrentSymbol(); } };Here you can see this: MarketMode = "all";