Buy Loop - AFL Help

#1
Pals,
Iam trying to do this. pls have a look and help me.

I have a afl which generates BUY/SELL signal.
After i take hold of a position on a script, If i can identify the contiunation of trend, say after 5% still the trend continues, i would want to enter another lot or so. but i want this to be inherently built into the afl.

so i need the afl to tell me this.

a. first give the buy/sell signal.(this i took care)

b. my afl would run in RT environment. so every 5 mins, the afl would run and do a backtest.
now after i plot my signal, i need the afl to check the % movment in a trend. e.g. it should have a threshold of 4-5%.
Say, if BUY is generated and the script moves 4% from the buy is generated, afl should signal me another BUY.

so inside this

Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
Short = Sell;
Cover = Buy;

i need to build a loop to check for ROC.

this is the crude idea i want to work on. Am not sure how far this would give me an edge, but i wanna try it out. If u have any skeleton or any function/command examples i can work on, pls do share with me. i will build it from there.

cheers
ren
 

Similar threads