The Greatest Gold Stock System You Should Trade (Amibroker And Tradestation Code)

The strategy in plain English:

Unfortunately, these systems don’t work anymore.

We have two strategies. This is the first one:

If GDX rises from the open to the close more than 0.1%, buy on the close and exit on the opening the next day (this strategy doesn’t work well anymore).

This is the second strategy:

If GDX rises from the open to the close more than 0.1% the day before, sell short on the opening and exit on the close (this strategy has also deteriorated). This is a day trade.

Click here for the original article.

Amibroker code:

The first strategy:

setOption(“holdminbars”,1);

Buy= ((c-o)/o) > 0.001;

buyPrice= C;

Sell= c>0; //force exit

sellPrice= O ;

The second strategy:

short= ((Ref(C,-1)-Ref(O,-1))/Ref(O,-1)) > 0.001;

shortPrice= O;

Cover= c>0; //force exit

coverPrice= C ;

Tradestation code:

{
The Greatest Gold Stock System You Should Trade (Strategy 31A)
Unfortunately, these systems don't work anymore.
If GDX rises from the open to the close more than 0.1%, buy on the close and exit on the opening the next day 
}

Inputs:
	Treshold(0.001);

if (Close - Open) / Open > Treshold Then
Begin
	Buy this bar on close;
	Sell next bar on open;
End
{
The Greatest Gold Stock System You Should Trade (Strategy 31B)
If GDX rises from the open to the close more than 0.1% the day before, sell short on the opening and exit on the close.
This strategy has also deteriorated. This is a day trading.
}

Inputs:
	Treshold(0.001);

if (Close - Open) / Open > Treshold Then
	SellShort next bar on open;

if Marketposition = -1 then
	BuyToCover this bar on close;

Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.