Init is a function that mt4 calls when you first install an indior. The code which I listed there in my prior response ought to go beneath that function call.

If your code does not have an init function use the one below:

int init()
oktotrade=true;