TradingView
SeaSide420
29 de Ago de 2016 08:06

SS420FX 

U.S. Dollar/Japanese YenFXCM

Descrição

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))

Notas de Lançamento

removed (overwritten)
Comentários
SeaSide420
just in case someone doesn't already know, this strategy repaints.
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.
ale.agos
Just a question about repaint... I'm new in Tradingview so I don't know more about the problem. If I well understand repaint occurs when price (close I guess looking at your code) change due to new tick arrival. So repaint should influence just the live use of the strategy and not back-test on past data due to the fact that they are fix values (each candle has fix value of OCLH). If I'm right I understand your warning about use of strategy in live but we should have affordable results in backtest. I'm right or not? Also, with the goal to overtake the problem of repaint, what about use it as an indicator (as you suggested) looking at signal on last candle (not on candle who is growing)? Hope to be clear and sorry for my bad english! :)
SeaSide420
hi, if you reduce the Stop Loss amount, then the script can close position when it goes wrong, and then can open new position. So then it is more accurate to follow as an indicator.
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.
ale.agos
Hi and thanks a lot for your kindly answer and all info about your method. I will try to do some test with the goal to see how it work. Due to the fact that my broker ( IG ) give me the possibility to use Prorealtime trading platform maybe I could try to convert the code with the goal to use / backtest it with Prorealtime and see what happen there. I know that prorealtime execute code every single candle (not every tick because when you are coding it ask you if you want to buy/sell at close or open so I guess it evaluate the candle when is complete at the end of every single timeframe) so it should not have repaint.
BarsStallone
Is there an Alert for this one?
SeaSide420
SeaSide420
oh, what i mean is there is now a SS420FX indicator built to be Alert friendly
because cant put alert on strategy
BarsStallone
Thank you
Mais