On chart won't work on tester, for this, you need to use on tick, condition block, object on chart, button pressed/depressed == 1 - buy/sell (complete action)block - redraw button off
That would mean you can use the button drawn on init in backtest ensuring it is switched back off if used