ML Prediction Trade Execution - Closed Issue

I was reaching out to the community to see if anyone can help with my code to execute a trade based on the ML prediction output once that has completed.

I am using a demo account and streaming data to train my ‘robot’ at the moment.
Within my code I am able to execute trades, however this is during the training which of course tend to be very bad and then once the prediction finishes is when I am looking to execute a trade.

This notebook is available on GitHub.
FXCM ML Notebook

As an updated note, I am assuming that I require that my MLP to provide the next signal to buy or sell where I am to execute the trade from. Apart from this small issue the trading algo should be ok once the code is tidied up as it is a work in progress I have not paid much attention to it.

I have working versions that print out a of the output, however this all takes time that is better put to use computing the predictions.

Happy to explain any details.

UPDATE

This is now been addressed 03 June 2019