How to write Elder's 6% rules for backtest procedure

howto
Tags: #<Tag:0x00007f2d7a505a38>

#1

Hello

How to write rules for elder 6% equity loss in afl for backtest procedure?
If from begining of the new month the highest equity drop 6%, all trades must be close for the rest of the month. We are allowed to open position again on the next month

can someone please kindly point out where to look in the amibroker knowledge base or paste the code?

I am sure somebody already write the code and its so easy to do it in amibroker, but still I cant find it....

thanks


#2

Hello @sikatgigi

Have you looked in the Amibroker Members’ Zone —> AFL Library?
http://www.amibroker.com/members

I don’t know if the Elder’s 6% is there specifically, but there are a number of Elder’s ideas that members have shared there.

Cheers,
Jim


#3

helo @nomad,

thanks for the reply, I just doble checked there, but I cant find it....


#4

That is odd. When I signed in earlier today and did a sesrch in the formula list for Elder; a number of hits came up.


#5

ahh yes, there is some Elder's formula in there, but there is no rules for Elder's 6%.

If you can find it, please kindly tell me the link I will go in to check it


#6

From original response


#7

@sikatgigi I suspect the best way to achieve this

is by using the custom backtest interface (referred to as a CBT). You need to calculate your current month's drawdown and when it reaches your threshold (6% in your example) then Exit existing trades and block any new Entries.

I have not seen an existing code like this so you will need to code it. I'm sure members of the forum will be interested in your code if you do.

Best wishes.


#8

@portfoliobuilder, yesss, that's it.... too bad I don't have coding skills, that is why I am asking in this forum....and like you said I also have not seen anyone coding this....

too bad....