Text this: Integrated energy trading algorithm for source-grid-load-storage energy system based on distributed machine learning