I'm afraid I do not really understand your problem. When you have open positions, you borrow margin and pay interest. That is the rollover. It has nothing to do with stock or forex. Forex is only a special case as you trade pairs, so rollover is here the interest difference.

Just enter the Rollover in the asset list as in the example that I gave. It is daily interest*price*(1-1/leverage). If you want it to be very precise, you can really calculate rollover in the script once per day, but then you need to know the broker's current interest.