**Two Moving_Average cross's & Daily_Candle cross**

Based on Hull_MA

Developed by Alan Hull, it is an indicator, that solves the problem with making a moving average more reactive to current price activity. The Hull Moving Average almost eliminates lag and manages to improve smoothing.

The HMA manages to stick to rapid changes in price activity, as it has superior smoothing over a Simple Moving Average of the same period. The HMA employs Weighted Moving Averages (WMA) and dampens the smoothing effect. It can be calculated as follows:

**HMA(n) = WMA(2*WMA(n/2) – WMA(n)), sqrt(n))**

//@version=2 //SeaSide420 strategy("SS420FX", overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=720, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0) q=input(title="HullMA Short",type=integer,defval=14) z=input(title="HullMA Long",type=integer,defval=14) dt = input(defval=0.0010, title="Decision Threshold", type=float, step=0.0001) SL = input(defval=-50000.00, title="Stop Loss in $", type=float, step=1) TP = input(defval=100000.00, title="Target Point in $", type=float, step=1) ot=1 n2ma=2*wma(close,round(q/2)) nma=wma(close,q) diff=n2ma-nma sqn=round(sqrt(q)) n2ma1=2*wma(close[1],round(q/2)) nma1=wma(close[1], q) diff1=n2ma1-nma1 sqn1=round(sqrt(q)) n1=wma(diff,sqn) n2=wma(diff1,sqn) z2ma=2*wma(close[11],round(z/2)) zma=wma(close[11],z) ziff=n2ma-nma zqn=round(sqrt(z)) z2ma1=2*wma(close[12],round(z/2)) zma1=wma(close[12], z) ziff1=n2ma1-nma1 zqn1=round(sqrt(z)) z1=wma(diff,sqn) z2=wma(diff1,sqn) z1e=z1>z2?green:black z2e=z1>z2?black:red z3e=z1>z2?green:red n1e=plot(z1, title="HMA1", color=z1e, linewidth=2, offset=2) n2e=plot(z2, title="HMA2", color=z2e, linewidth=2, offset=2) fill(n1e, n2e, color=z3e, transp=80) confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close[1]))/security(tickerid, 'D', close[1]) closelong = n1<n2 and close<n2 and confidence<dt or strategy.openprofit<SL or strategy.openprofit>TP if (closelong) strategy.close("Long") closeshort = n1>n2 and close>n2 and confidence>dt or strategy.openprofit<SL or strategy.openprofit>TP if (closeshort) strategy.close("Short") longCondition = n1>n2 and z1>z2 and strategy.opentrades<ot and confidence>dt and close>n1 if (longCondition) strategy.entry("Long",strategy.long) shortCondition = n1<n2 and z1<z2 and strategy.opentrades<ot and confidence<dt and close<n1 if (shortCondition) strategy.entry("Short",strategy.short)

that means the percent-profitable is not correct. it is in reality much lower, around 60%

when signal appears, if price keep in that direction, then ok, but if retracts back through the signals condition level,

and you refresh the page you will see the signal disappear!

This can be very frustrating to people who do not yet know about the repainting.

All i can say is, don't rely 100% on this strategy, it is more of a confirmation tool, to be added to your already existing

understanding of the market movements.

Bringing the SL setting in tight means you dont have to refresh the page to see the signal be wrong.

And will bring the Percent-profitable down to a realistic amount, and therefore you'll see more realistic results, and then can test this HullMA strategy on different pairs etc...

and see if my Dual HullMa cross & DailyCandle cross combination helps you at all with speculating the Forex market.

Also then the results are more realistic. You could manually simulate this strategy by having four HullMA indicators on your chart, and by looking at 3 different timeframes at once.

5minute,60minute,Daily

HullMA1 = Timeframe-5m, period 14, step 0

HullMA2 = Timeframe-5m,period 14,step 1

HullMA3 = Timeframe-60m, period 14, step 0

HullMA4 = Timeframe-60m,period 14,step 1

if hullMA1 is above hullMa2 and hullma3 is above hullma4 then open buy

if hullMA1 is below hullMa2 and hullma3 is below hullma4 then open sell

if price is above the 5mHullMA then buy only

if price is below the 5mHullMA then sell only

and the Daily cross is simply - if price is below previous candle close then sell only

if price is above previous candle close then buy only

those are the conditions for the strategy.

But just try reducing the SL and you will see better results.

I dont have low SL because then the chart gets a lot of signals and closes on it,

I just keep in mind when it might be going to repaint, and refresh page, and then have clean chart.

Once the "open" and "close" words pile up on top of each other it gets a bit messy.

the tighter the SL, the more opening and closing it will do.

But then the Percent-profitable will show more realistic results for the backtest of strategy on different pairs.

because no, the backtest results are not realistic with high SL, because it does not show all the times it was wrong.

because cant put alert on strategy