AmiBroker and Python exchange data through CSV

Hi all,

I have a positionsizing algorithm created in Python that computes the positionsize of the next trade. The intention is that the Python algorithm outputs the positionsize to a CSV file, and then AmiBroker reads the last line of the CSV and uses that information as positionsize for the next trade . However, the problem is that the AFL script has to wait for the positionsize to be computed in python and appended as a new row in the csv. Does anyone have any suggestions on how to solve this? I basically need the backtester to wait for the new line to be appended before continuing the backtest.

Thanks,

Mixing platforms is bad idea because you shoot yourself in the foot by complicating easy things. Either do everything in Python or do everything in AmIBroker (best solution).

Thanks for the reply Tomasz.
I will probably migrate the Python code to AFL then,

BR