APSAT Assignment 3
The following assignment from APSAT makes you learn AFL coding in sequential way. When you submit the assignment questions (AFLs), we will email you the solutions
1.(A) Add a trade counter to “Range Stratgey recitified.afl”: whenever there is Buy trade, calculate: counter= counter +1. Use this trade counter to calculate total number of trades and display it in the Title.
1 (B) Modify the trade counter statement to calculate the number of trades in a specific year- example 2016.
2. Modify “Range Stratgey recitified TSL.afl” so that strategy has SL= 2ATR and TSL= 4ATR. Long trade should be exited whenever either SL or TSL is breached.
3. (A) Modify “Range Stratgey Rectified.afl” so that trade entry is delayed by exactly 2 bars. It means if I have a signal at current bar, modified Buy and Short signals should come after 2 bars. There should be no change in Sell and Cover signals. The entry signal generating candle is given index-0, next candle index-1, next index-2, so modified entries should occur on candle with index-2. Plot both initial entries and modified entries on the chart.
3. (B) Modfy AFL in part A so that Buy entry is taken ONLY if index-2 candle body is more than 1 ATR
3. (C) Modify AFL in part B so that Buy entry is taken on the first candle (after the signal generation candle) whose body is more than 1 ATR