I have a strategy in which I use MACD to close trade when histogram is equal to 0. But close command is not executing. Where is the logic wrong?
Logic:
1. if Open position is greater than 0 (MyOpenPositions =0), then
2. if macdHist11 equals 0 (MACDLevel0 = 0), then
3. close BUY(out values Open at market buy = BUY) or close SELL (out values of Open at Market sell = SELL)
