The EA opens a position when the conditions are met using Heiken Ashi (standard MT4 version), MA (method and period to be specified in inputs) and MACD Histogram (12,26,0).
Buy - one long position at the close of first white Heiken Ashi bar after a red bar and any part of that white bar, either body or shadow, has crossed above MA or is completely above the MA. Corresponding MACD Hist bar is blue.
Close long - Heiken Ashi bar or MACD Hist bar closes red (MA not to be considered) but only if long position(s) in profit. If not in profit leave open.
Additional long position added at next buy condition. Will only close at close condition if all long positions show combined net profit. If not leave open, add another long at next buy condition, etc, and so on until they can be closed when showing net profit.
Sell - as above but reversed.
______________________________________________
As there is no SL I require the following hedging safeguard should there be a breakout in the wrong direction:
An example scenario; there are two buy positions open and five sell, but an upward breakout occurs (meaning the extra three sell positions are depleting equity). At a specified point, (x)% of current equity, additional hedge position(s) of equivalent size to the three short positions would be opened to prevent further loss.
The same close conditions would then apply to these as with the others.
______________________________________________
Inputs / parameters:
Magic number - Lot size based on account balance / manual lot size - Max number of positions - TP - SL - TS - Minimum profit close - MA method - MA period - Trading days and times - Hedging/close on reverse
I know some of the specified inputs may conflict with or override the strategy (such as hedging/close on reverse input) but we can discuss this later.