The Buy / Sell algo will continuously buy and sell when relevant conditions are met.
----------------------------------------------------------------------------------------------------------
This Algo operates as follows:
Once created, it will wait for the buy condition to become valid
It will remain in the WAITING TO BUY mode until the buy condition becomes valid
Once the buy condition becomes valid and the algo successfully buys the unit amount, the algo will transition to the WAITING TO SELL mode
The algo will remain in the WAITING TO SELL mode until the sell condition becomes valid
Once the sell condition becomes valid and the algo successfully sells the unit amount, the algo will transition back to the WAITING TO BUY mode
The algo will continue to cycle between these modes until:
There is not enough balance to buy, at which point it will go into "IDLE" mode
It is manually put in to "IDLE" mode