Dividends are entered according to ex-dividend date. If the ex-dividend date is 30.06.2020 then the dividend should be entered for the positions being held at close of business on 29.06.2020 (dividend should be entered 30.06.2020). The calculation is Position size*Dividend amount which means If client is short, dividend should be minus (we should deduct from client) and if client is long, then it should be plus (we should pay to client)e.g., AAPLUS and dividend amount per share is 0.20 USD, if client is holding a buy position of 20 lots, client will receive 4 USD and if client is short of 20 lots, client will pay 4 USD.