Welcome roshanbaba!

Probably best to clarify a few things...

set(TICKS) applies to Test - it determines how the History files are processed in Test.

If I understand correctly what you're trying to accomplish, you need BOTH run() and tick() functions. run() is the required "master" function for Trading and will be called on every bar, however you've defined the bars. tick() would be called on every tick.

HTH.