I want to run a backtest on a simple setup. Can some one help me with the AFL please?
Criteria
SAR default values in Amibroker
Time Frame 5 minutes
Buy & sell / Short & cover as per the signals of SAR
Thanks a lot in advance,
Regards,
Bro, AFL you are asking is very simple to make it in amibroker itself.
I could have posted the afl here, but want you to llearn how these Simple AFL can be made from amibroker AFL code wizard.
Go to Analysis--AFL Code wizard
AFL code wizard window will open up and you can see the 4 criteria lined up der i.e Enter Long, Exit Long, Enter Short, Exit short"
Click on enter Long---Add item (Left side bar)
You will get Close>10 (its a default)
Click on close---down windlow, scroll down you will see the SAR---click on it
Now you will see SAR(0.02,0.2)>10
Click on number 10, then down window click on "Value of"
Now u can see SAR(0.02,0.2)>Close
Click on Greater than sign ">"
You will get 3 option,
Click on Less than
So the final Buy condition would be
SAR( 0.02, 0.2 ) < Close
Others u need to complete. (your homework)