We have a tool called Turnover with a function TO() which is basically the daily value of trading (close x volume). We can take the TO() value and multiply it by -1 when the IF() condition is false. This will calculate the all-time money flow:
//Get Turnover value based on the close position;
V1 = IF(CLOSE() IsUp, TO(),TO()*-1);
//Sum the values;
ACC(V1, RANGE=All Time)