USDJPY trading strategy - 1minTF - SAR and EMA

Category: Strategies By: grizzly Created: May 28, 2016, 7:09 PM
May 28, 2016, 7:09 PM
Strategies
78 Comments

Hi everyone,

Wanted to share my simple Automated strategy for USD/JPY mini using a 1minute timeframe, with SAR and EMA indicators.

Code also includes money management to adjust for position sizes – adjust this for your liking etc.

Any thoughts or suggestion is welcome! Enjoy..

DEFPARAM CumulateOrders = false
//INDICATORS//
mm3= exponentialaverage[200*3]
mm2= exponentialaverage[200*1.5]
mm1= exponentialaverage[200*1]
PARABOLIC = SAR[0.001,0.001,0.2]
C1 = PARABOLIC>HIGH //RED SAR = SHORT
C2 = PARABOLIC<LOW //GREEN SAR = LONG
Spread = 1.1
//

//MONEY MGT//
Equity = (Strategyprofit+20000)
Risk = round(Equity/100000)
Losses = positionperf(1)<0 and positionperf(2)<0 and positionperf(3)<0
streak = positionperf(1)>0 and positionperf(2)>0 and positionperf(3)>0
if losses then
 n = max(abs(round(max(3+risk-2,risk-2))),2)
elsif not losses then
 n = max(abs(round(max(3+risk,risk))),2)
endif
if streak then
 n = max(abs(round(max(5+risk,risk))),2)
endif
//

T1 = (barindex-tradeindex>=3)
T2 = (barindex-tradeindex>=3)

//ENTER LONG//
if (mm1>mm2 and mm2>mm3) and c2 AND T1 then
 buy n contract at breakeven+spread*pipsize limit
 breakeven = parabolic
  if T2 and longonmarket then
   sellshort at breakeven+spread*pipsize stop
  endif
endif

//ENTER SHORT//
if (mm1<mm2 and mm2<mm3) and c1 and T1 then
 sellshort n contract at breakeven-spread*pipsize limit
 breakeven = parabolic
  if T2 and shortonmarket then
   exitshort at breakeven-spread*pipsize stop
  endif
endif

 

Download
Filename: Week3.jpg
Downloads: 153
Download
Filename: USDJPY_AVGSAR_2.itf
Downloads: 388
grizzly Average
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...