AFL code needed – Please Help

Hi,

I need a code for below condition with SL, TSL  and TGTs to reflect on intraday chart.

  1. Entry Price = average (5Days High Ema+5Days Close Ema+5Days Low Ema)/15.
  2. Stop loss is 30 points of Entry Price (e.g  if Entry Price is 8600 then for long SL is 8600-30=8570 and for short SL is 8600+30=8630)
  3. Trailing stop loss= average (5Hour High Ema+5Hour Close Ema+5Hour Low Ema)/15.
  4. Targets are 50, 100, 150 and 175 from Entry price.

e.g For long                                                       

8600+50=8650

8600+100=8700

8600+150=8750

8600+175=8775

For Short

8600-50=8550

8600-100=8500

8600-150=8450

8600-175=8425

The above conditions contains Entry - SL with trailing and exit condition, to achieve this in AFL in Robust will be little complex you can contact some AFL expert on this.

Seniors/Experts,
Request you to help me for above code.
Thanks!