QIAT Section – 5 Assignment - AlgoJi

The following assignment from QIAT makes you learn basic AFL coding. When you submit the assignment questions (AFLs), we will email you the solutions 🙂

Question 1: Write a code for strategy discussed in http://algoji.com/rsi-crossover-system/ without using loop. Use exrem instead of loop and identify. Note carefully any limitations with exrem.

Qestion 2: Modify “HHV LLV TSL timings.afl” so that strategy trades ONLY in first 15 days of month. Hint: Use Day() function

Qestion 3: Code for the Short and Cover side in “HHV-LLV rectified.afl”

Qestion 4: Code for ShortPrice and CoverPrice in the solution to Question 3.

Qestion 5. (A) Code a strategy using for loop using following buy/sell rules Indicator: Code ATR Bands. UpperBand: MA(C,20) + 2*ATR(), LowerBand: MA(C,20) – 2*ATR() Buy: When prices cross above UpperBand Sell: When prices cross below LowerBand

Qestion 5. (B) Add TSL and trade timings to 5(A)

Qestion 6: Add a profit target to “HHV LLV TSL.afl”

Qestion 7: Modify the code given in http://algoji.com/rsi-crossover-system/ to add TSL, Trade Timings and Trade Price