I am new to afl coding. I am trying to achieve this:
- Buy if close> last bar close --- This is to start for the day
- If the last signal is buy, then sell at 2% Profit or Sell if Stop Loss hit at 1% and reverse the trade.
- If exit in profit and the earlier signal was buy then sell in next bar close.
For Short side just similar.
if first entry is Long @300 then sell @306(if profit) or exit and new short entry @297(if SL hit). For profit hit then entry in Short at next candle close.
If the entry is at short side @300 then buy @294(if profit) or exit and new Long entry@ 303(if(SL hit). For profit then entry in Long at next candle.
Can you pleasehelp me achieve this.