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
Nowhere yet.
void Print( MqlTick& ) {} // 'Print' - override system function
I.e. external class "::" won't allow overloading, but any internal class will.
That's why we have to crutch the restriction
{
public:
template <typename T>
static void MyPrint( const T &Value )
{
T Array[1];
Array[0] = Value;
::ArrayPrint(Array);
}
template <typename T>
static void MyPrint( const T Value )
{
::Print(Value);
}
};
#define Print(A) PRINTCLASS::MyPrint(A)
void OnStart()
{
MqlTick Tick;
SymbolInfoTick(_Symbol, Tick);
Print(Tick);
int i = 5;
Print(i);
}
Forum on trading, automated trading systems and strategy testing
MetaEditor build 1463
fxsaber, 2016.11.04 18:42
There is still a problem.Found a problem with my indicator in the tester. Since build 1463 the tester hangs when testing the indicator, almost immediately after start. It is the tester that hangs, not the indicator. Because, when compiling with either old or new compiler, the problem remains, but in the old tester everything is tested normally.
The place in the code, which leads to a hang, could not be found. I tried to make Comment in different lines of code, but it always hangs in different places. In general, some kind of internal error tester.
Found a problem with my indicator in the tester. Since build 1463 the tester hangs when testing the indicator, almost immediately after start. It is the tester that hangs, not the indicator. Because, when compiling with either old or new compiler, the problem remains, but in the old tester everything is tested normally.
The place in the code, which leads to a hang, could not be found. I tried to make Comment in different lines of code, but it always hangs in different places. So, some kind of internal bug in the tester.
So still hangs or in the tester you just set the maximum test speed?
Added: I haven't encountered this before, so it's very desirable to review your code.
The place in the code causing the hang-up could not be found.
So does it freeze, or do you just have it set to the maximum test speed in the tester?
Added: I haven't encountered this before, so it's very desirable to review your code.
It freezes at any speed. The StrategyTestVisualization window does not respond. Unfortunately, I cannot show you all of the code, it's a commercial product.
It does not depend on the test mode and timeframe, either.
It freezes at any speed. The StrategyTestVisualization window does not respond to requests. Unfortunately, it's not possible to show the whole code, it's a commercial product.
2016.11.10 11:07:42.764 Test (EURUSD,M1) [0] 2016.11.10 11:10:11 1.09207 1.09217 1.09207 500000 1478776211595 2
The only thing missing is an ArrayToString. Then the output could be modified. For example, time_msc and flags.
{
datetime time; // Время последнего обновления цен
double bid; // Текущая цена Bid
double ask; // Текущая цена Ask
double last; // Текущая цена последней сделки (Last)
ulong volume; // Объем для текущей цены Last
datetime_msc time_msc; // Время последнего обновления цен в миллисекундах
uint flags // Флаги тиков
};