【发布时间】:2018-03-02 18:53:05
【问题描述】:
部分代码:
int OnInit()
{
Print( "SL mover started" );
return( INIT_SUCCEEDED );
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
modifySLs();
}
void modifySLs()
{
int i, total = OrdersTotal();
Alert( total );
Print( "modify runs" );
for( i = 0; i < total; i++ ) {
modifySLIfNeededForSelectedOrder( i );
}
}
为什么OnTick() 不运行?
当我在 Strategy Tester 中运行时,它不会在日志中打印任何消息,也不会调用 Alert() 函数。 OnInit() 函数有效 - 在日志中打印“SL mover started”。
【问题讨论】:
-
@Darius-v 以下建议的解决方案对您的 Strategy Tester 实验有何帮助?
标签: mql4