Hi all,
I would like to share my work on what should be a simple strategy to gain profit in market, in particular forex.
Let’s start from this statement:
Buy when prices are moving up. Buy each retrace/dip. Keep buying until the last retrace becomes a trend change which is the one trade you lose on.
Sell when prices are moving down. Sell each retrace/rally. Keep selling until the last retrace becomes a trend change which is the second trade you lose on.
Looks easy isn’t it?
Why forex? Because currencies pairs cannot go to zero, neither raise to the moon, they must stay in ranges determined by central banks politics, government actions etc. They trend for days or weeks, giving multiple opportunities to enter.
First of all, we must be able to identify if there is a trend. Due to the lack of mtf on PRT, I used a little trick. I use RSIOMA (https://www.prorealcode.com/prorealtime-indicators/rsioma-indicator/) with a multiplier for higher timeframe.
Example:
ma=ExponentialAverage[14*tfx](WeightedClose)
rsioma=rsi[14*tfx](ma)
marsioma=ExponentialAverage[21*tfx](rsioma)
where “tfx” is a round number thet gives me an higher tf rsioma on my tf. f.e. if I am on a 1H chart, tfx=24 give rsioma of daily tf.
bullish=rsioma>rsioma[1] and rsioma>marsioma
bearish=rsioma<rsioma[1] and rsioma<marsioma
longtrendbullish=summation[10](bullish)=10
longtrendbearish=summation[10](bearish)=10
with these conditions I can determine if overall trend is bullish or bearish.
Now, I wanna get an entry signal in the direction of bigger trend. This is where we can speculate the most (rsi, adx, moving averages crossover…) but I personally pick Leo’s moving average (https://www.prorealcode.com/prorealtime-indicators/leo-moving-average-supportresistance/) because, according to his own words “it is an indicator that do not move so quickly as the Hull Moving Average but no lagging like exponential or weighted moving average”.
This is the base for developing a strategy (or strategies) discussion:
//rsioma higher timeframe
ma=ExponentialAverage[14*tfx](WeightedClose)
rsioma=rsi[14*tfx](ma)
marsioma=ExponentialAverage[21*tfx](rsioma)
bullish=rsioma>rsioma[1] and rsioma>marsioma
bearish=rsioma<rsioma[1] and rsioma<marsioma
longtrendbullish=summation[10](bullish)=10
longtrendbearish=summation[10](bearish)=10
//Leo moving average for retracement
//period=20
//Formula: LMA=WMA+(WMA-SMA)
LMA=2*weightedaverage[period](close)-average[period](close)
smoothLMA=weightedaverage[period](LMA)
entrylong=LMA crosses over smoothLMA
entryshort=LMA crosses under smoothLMA
if longtrendbullish and entrylong then
DRAWARROWUP(BARINDEX,LOW-0.003) coloured(0,100,155)
endif
if longtrendbearish and entryshort then
DRAWARROWDOWN(BARINDEX,HIGH+0.003) coloured(255,100,155)
endif
return
Would like to have feedbacks and ideas about it.
Thanks!