Experts: Long and Short Stepped Grid Trade

 

Long and Short Stepped Grid Trade:

Proportional grid distance, open long and short orders at the same time, skip two grids to take profit; When the equity recaches the take profit of setting, close all positions and restart.

Long and Short Stepped Grid Trade

Author: Xiao Hua Feng

 
Sorry, the code is wrong, I will modify it later. Forget to judge the balance.
 
Xiao Hua Feng #:
Sorry, the code is wrong, I will modify it later. Forget to judge the balance.

What do you think is wrong in the code?