EURUSD Trading Strategy (Amibroker And Tradestation Code)

The original article can be found here.

Code in plain English:

  • We short at the close of the first trading day of a new month, and
  • We cover at the close of the tenth trading day.

Amibroker code:

Short= Month() != Ref(Month(),-1) AND C>Ref(C,-22);
shortPrice=Close;
Cover= 0;
coverPrice=Close ;

Tradestation code:

{
Strategy - EURUSD Trading
https://www.quantifiedstrategies.com/lessons/eurusd-trading-strategy-amibroker-code/
}

if Month(Date) <> Month(Date[1]) AND Close > Close[22] Then
	Sellshort this bar on close;
	
if Barssinceentry(0) >= 10 Then
	Buytocover this bar on close;