If anyone's still interested, there's an extra % in the beginning of printf statement:

Code
    if(is(EXITRUN))
        printf("\n\n%W: %.2f%%\nWins: %d Losses: %d\nWinTot: %.0f LossTot: %.2f\nPips/Trade: %.1f", 
        100.*win/(win + loss), win, loss, winTot/PIP, lossTot/PIP, (winTot-lossTot)/PIP/(win+loss));


Should be:
Code
    if(is(EXITRUN))
        printf("\n\n W: %.2f%%\nWins: %d Losses: %d\nWinTot: %.0f LossTot: %.2f\nPips/Trade: %.1f", 
        100.*win/(win + loss), win, loss, winTot/PIP, lossTot/PIP, (winTot-lossTot)/PIP/(win+loss));


BTW, misspelled printf statements is one of the most frequent reasons of crashing with no error code. Cool piece of code though.

Last edited by nsg; 02/26/23 09:18.