Type/to search
0
Follow
0
Followers
Por favor, explique por que a função onexit não é executada?
FAQ
Created 2015-07-24 11:10:17  
 1
 2328

Escrevi uma estratégia para a estatística, para a saída do resultado final da estatística com a função onexit, quando o retorno descobriu que a função onexit não foi executada, e o nome da função foi alterado para onExit.

function onTick()
{
//do something here
}

function onexit()
{
Log("Exit now!!!!");
}

function main() {
for(var i=-30;i<31;i++)
{
g_s[i] = 0;
}

while(true) { onTick(); Sleep(1000); }

}

Related Recommendations
Comment
All comments (1)

    回测的时候, main正常退出才会触发onexit, 你这个main不会退出, 实盘的时候, 点击停止应该就会调用onexit

    11 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)