Stochastic Evolution trading strategy on Forex 1-hour timeframe

Category: Strategies By: Pier Created: December 3, 2018, 10:58 AM
December 3, 2018, 10:58 AM
Strategies
7 Comments

A very simple strategy based on the crossing of 2 oscillators. It works well on EUR USD 1 H and forex in general

  • When green line crosses over red line enter long
  • When red line crosses over green line enter short

The strategy also embed a trailing stop that start at 20 pips profit with a step of 5 pips.

Be sure to have the “StocEvo” indicator in your platform (download the attached files and import them to be sure, otherwise the strategy will not work).

sel, ses, ignored = CALL StocEvo[21]

//condition to enter long 
b1 = sel crosses over ses
b1 = b1 and sel > 36

IF NOT OnMarket AND b1  THEN
 BUY 1 CONTRACTS AT market
ENDIF

// condition to exit long
b2 =  sel > 53
If LongOnMarket and b2  THEN
 SELL AT MARKET
ENDIF

// condition to enter short
//se1 = ses crosses over sel
s1 = s1 and ses > 36

IF NOT OnMarket AND s1   THEN
SELLSHORT 1 CONTRACTS AT market
ENDIF

// condition to exit short
s2 = ses > 53
IF ShortOnMarket and s2 THEN
 EXITSHORT AT MARKET
ENDIF

//trailing stop function
trailingstart = 20 
trailingstep = 5 

//reset the stoploss value
IF NOT ONMARKET THEN
 newSL=0
ENDIF

//manage long positions
IF LONGONMARKET THEN
 //first move (breakeven)
 IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
  newSL = tradeprice(1)+trailingstep*pipsize
 ENDIF
 //next moves
 IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
  newSL = newSL+trailingstep*pipsize
 ENDIF
ENDIF

//manage short positions
IF SHORTONMARKET THEN
 //first move (breakeven)
 IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
  newSL = tradeprice(1)-trailingstep*pipsize
 ENDIF
 //next moves
 IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
  newSL = newSL-trailingstep*pipsize
 ENDIF
ENDIF

//stop order to exit the positions
IF newSL>0 THEN
 SELL AT newSL STOP
 EXITSHORT AT newSL STOP
ENDIF

SET STOP %LOSS 0.45

// stokEvo oscillator

if low < low[1] then
 llv = (highest[b](low)-low)/(highest[b](low)-lowest[b](low))
else
 llv = 0
endif
LLSv = exponentialAverage[b](LLv)*100

if high > high[1] then
 hhs = (high - lowest[b](high))/(highest[b](high)-lowest[b](high))
else
 hhs=0
endif
hhsv = exponentialaverage[b](hhs)*100
return hhsv coloured(0,250,0) style(line,2),llsv coloured(300,0,0) style(line,2),50 coloured(300,0,0) style(line,2)

 

Download
Filename: StocEvo.itf
Downloads: 528
Download
Filename: Stoc-Evolution-Forex-strategy.itf
Downloads: 696
Download
Filename: screenshot-15435749494lp8c.jpg
Downloads: 375
Pier Veteran
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...