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).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
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 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// 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) |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Pier, I’ve put the indicator under the graph and it draws the two signal lines and one red horizontal line? is it correct? should I see a green horizontal line too? thanks
Maybe the parameter “P” has not been set
The default setting is 21
it works only for Long position; it does not work in short position, do you know why?
line 18, replace the begining “//se1” to “s1”
Vytautas: es bleibt aber nur bei long Auslösungen
es sind leider nur long Positionen und keine Short zu erkennen.
this one is not a winner, have backtested it on almost all pairs, does not have an edge