Double bottom or double top
Forums › ProRealTime English forum › ProOrder support › Double bottom or double top
- This topic has 47 replies, 1 voice, and was last updated 3 years ago by steve_.
Tagged: double bottom, double top
-
-
10/29/2017 at 8:50 AM #5080310/30/2017 at 6:27 AM #50870
Hi Leo Do you already try to apply your indicator to a strategy by selling stop or buying stop ? Regards
Not yet
10/30/2017 at 6:47 AM #50871Hi all,
I was working in the detection of double top and double bottom (W&M).
- I solve the issue of repeating the locas max and min by adding another condition
- It knows where the pattern is activated or cancelled
- It draws an arrow in possible places to open a trade
- It still having a strange signal when the markets moves very quickly (but I don’t have any idea why is drawing a very strange triangle)
But I do not know yet how will be the ideal W and M pattern, I wonder why there are so many false double top or double bottoms. I though it was the most reliable technical pattern.
Hope I heard from you
W&M patterns123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176//LOCALS MINIMUMS AND MAXIMUMS USING LEO MOVING AVERAGE//Autor: LEO//VARIABLES TO BE OPTIMIZED//PERIOD=20 //Period for analysis//Kdouble=0.2 //Factor for defining what is double top or bottom//-----------//Leo Moving Average, formula: LMA= WMA+(WMA-SMA)LMA=2*weightedaverage[period](close)-average[period](close)//Smoothed curve of Leo Moving AverageIF BARINDEX > period THENsmoothLMA=weightedaverage[period](LMA)ELSEsmoothLMA=undefinedENDIF// Direction or trend of the LMA//once LMAdirection=1IF BARINDEX > period THENIF LMA > smoothLMA THEN//LMAdirection=1//colorsr=0g=130b=0ELSE//LMAdirection=-1r=200g=0b=0ENDIFENDIF// << Storage of minimums and maximums >>once mintemp=lowonce posmintemp=1once maxtemp=highonce posmaxtemp=1IF BARINDEX>2 THEN// the value 0.7 is to ensure that the donchian channel is faster than the curves analysis (this value to be checked)IF low < lowest[round(0.7*period)](low[1]) THENmintemp=low //minimum temporalposmintemp=BARINDEX //postition of minimum temporalENDIFIF high > highest[round(0.7*period)](high[1]) thenmaxtemp=high //maximum temporalposmaxtemp=BARINDEX //position maximum temporalENDIFENDIF// << Detecting and locating a local minimums >>// Where the LMA is crossing the smoothed LMA, there is a maximum or minimum nearby// If there is a new local min/max, the preivus one is stored in de varible B... (before)once LEVMIN=lowonce POSLEVMIN=1once LEVMAX=highonce POSLEVMAX=1once bullcross=0once bearcross=0IF BARINDEX > PERIOD THEN //For avoid computer errorsbullcross=LMA crosses over smoothLMAbearcross=LMA crosses under smoothLMAENDIFIF bullcross and POSLEVMIN<>posmintemp THENBLEVMIN=LEVMIN //previus local minimum is savedBPOSLEVMIN=POSLEVMINLEVMIN=mintempPOSLEVMIN=posmintempsupport=LEVMINDRAWARROWUP(POSLEVMIN,LEVMIN) coloured(0,0,0,30)ENDIF// --> Detecting and locating a local maximumIF bearcross and POSLEVMAX<>posmaxtemp THENBLEVMAX=LEVMAX //previus local maximum is savedBPOSLEVMAX=POSLEVMAXLEVMAX=maxtempPOSLEVMAX=posmaxtempresistance=LEVMAXDRAWARROWDOWN(POSLEVMAX,LEVMAX) coloured(0,0,0,30)ENDIFsupport=min(low,support)resistance=max(high,resistance)// << DETECTING DOUBLE TOP OR BOTTOMS >>once WidthDoubleTop = high-lowonce WidthDoubleBottom = high-lowonce Wpattern=0once Mpattern=0// <<<<<< Double bottoms >>>>>>>>>//looking for the top between two local minimumsIF bullcross THENdoublebottomtop=high[BARINDEX-POSLEVMIN+1] // we start looking for the top in between two local minimumsPOSdoublebottomtop=BARINDEX-POSLEVMIN+1FOR i = (BARINDEX-POSLEVMIN+1) to (BARINDEX-BPOSLEVMIN-1) DOIF high[i] > doublebottomtop THENdoublebottomtop=high[i]POSdoublebottomtop=BARINDEX-iENDIFNEXTWidthDoubleBottom = doublebottomtop-(BLEVMIN+LEVMIN)/2 // (top betwen local minimums) - (average of the las two local minimums)IF abs(BLEVMIN-LEVMIN) < Kdouble*WidthDoubleBottom THEN// we have a double bottomWpattern=1elseWpattern=0ENDIFENDIF// <<<<<<<<<< Double tops >>>>>>>//looking for the bottom between two local maximumsIF bearcross THENdoubletopbottom=low[BARINDEX-POSLEVMAX+1]POSdoubletopbottom=BARINDEX-POSLEVMAX+1FOR i = (BARINDEX-POSLEVMAX+1) to (BARINDEX-BPOSLEVMAX-1) DOIF low[i] < doubletopbottom THENdoubletopbottom=low[i]POSdoubletopbottom=BARINDEX-iENDIFNEXTWidthDoubleTop=(BLEVMAX+LEVMAX)/2 -doubletopbottomIF abs(BLEVMAX-LEVMAX) < Kdouble*WidthDoubleTop THEN// we have a double topMpattern=1elseMpattern=0ENDIFENDIF// <<<<<<<<<< DOUBLE TOP AND DOUBLE BOTTOM FOR TRADING >>>>>>>>myATR=AverageTrueRange[2*period](close)IF Wpattern=1 THENIF close > (doublebottomtop+myATR) or close < (LEVMIN-0.5*myATR) THENWpattern=0 // <<<< double bottom has been activated or it was cancelled >>>>>ELSE// <<<<<<< HERE WE HAVE A DOUBLE BOTTOM FOR TRADING >>>>>DRAWTRIANGLE(POSLEVMIN,LEVMIN,POSdoublebottomtop,doublebottomtop,BPOSLEVMIN,BLEVMIN) COLOURED(0,255,0,200)DRAWARROWUP(BARINDEX,low) coloured(0,255,0,100)DRAWRECTANGLE(BPOSLEVMIN,doublebottomtop+WidthDoubleBottom,POSLEVMIN,doublebottomtop+WidthDoubleBottom-Kdouble*WidthDoubleBottom) coloured(0,120,0,255)DRAWTEXT("Target",(BPOSLEVMIN+POSLEVMIN)/2,doublebottomtop+WidthDoubleBottom,SansSerif,Bold,13)coloured(0,120,0,255)ENDIFENDIFIF Mpattern=1 THENIF close < (doubletopbottom-myATR) or close > (LEVMAX+0.5*myATR) THENMpattern=0 //double top has been activated or it was cancelledELSE// <<<<<<< HERE WE HAVE A DOUBLE TOP FOR TRADING >>>>>DRAWTRIANGLE(POSdoubletopbottom,doubletopbottom,POSLEVMAX,LEVMAX,BPOSLEVMAX,BLEVMAX) COLOURED(255,0,0,200)DRAWARROWDOWN(BARINDEX,high) coloured(255,0,0,100)DRAWRECTANGLE(BPOSLEVMAX,doubletopbottom-WidthDoubleTop,POSLEVMAX,doubletopbottom-WidthDoubleTop+Kdouble*WidthDoubleTop) coloured(200,0,0,255)DRAWTEXT("Target",(BPOSLEVMAX+POSLEVMAX)/2,doubletopbottom-WidthDoubleTop,SansSerif,Bold,13)coloured(200,0,0,255)ENDIFENDIFRETURN LMA coloured(r,g,b,200) AS "LMA", support[1] coloured(140,0,200,250) style(DOTTEDLINE,1) as "support[1]", resistance[1] coloured(0,0,250,250) style(DOTTEDLINE,1) as "resistance[1]", smoothLMA coloured(r,g,b,200) style(DOTTEDLINE,1) as "smooth LMA" //, lowest[round(0.7*period)](low[1]), highest[round(0.7*period)](high[1])11/02/2017 at 8:36 AM #51262But I do not know yet how will be the ideal W and M pattern, I wonder why there are so many false double top or double bottoms. I though it was the most reliable technical pattern.
How could we know in advance if a lower low could be THE lower low in the next candles? That’s not possible, even if you wait enough time to confirm the pattern, the price will certainly make its own way without consulting you and your pattern detection indicator 🙂
11/02/2017 at 12:59 PM #51302Hi Nicolas,
…but this is not what we all pursue here with the technical anlysis: trying to see the past in order to “guess” what will hapend in the future?
Now that we have a code that detects local lows and high (while after it has formed), what are the ideal characteristic for defining a winner double top/bottom ??? What a human Traders see in a perfect double M or W?
I am thinking in the possibility to open an order limit after the double top/bottom is activated or confirm, but then we lost the opportunity to entry if there is not pullback…
11/02/2017 at 3:10 PM #5132611/02/2017 at 4:59 PM #5134011/02/2017 at 5:08 PM #51341Making pseudo statistical analysis is possible through the optimiser of ProBacktest:
- Define different scenarios on how to confirm an order at market, depending of your double top and double bottom indicator
- Optimise the variables (could be any criteria depending of the trading strategy itself) for each of the different strategy in a way to compare their results between them
11/13/2017 at 6:40 AM #52497Leo,
I l ove your approach to compare a weighted moving average with a simple moving average. This is the way to go and I’ll try to open a post discussing why this is the best setup to have. Keep working on it because your work so far is extremely interesting and promising in terms of double top/bottoms recognitions.
Gabri
11/13/2017 at 7:30 AM #52498Thanks for the comment Gabri.
I still analysing the double top/bottom that my indicator detects (things like symmetry, previous lows and highs, long term bias, etc). I saw that those patters are very unreliable, but produce an effective movement in the market though. Normally this strategy is a profit/risk ratio of 1:1… but barely happened (or I do not know yet when).
Here’s a reflexion for all: will you trade an strategy which profit/risk ratio of 0.5 or less like 0.3 with a very high chances of winning trades?
… by mathematics the answer is “yes of course”. But in real life imagine a robot who have 4 winning trade in a row an then it lost the next one and it takes the profit of the previous 3 trades… it can be hard for the moral.
what’s your opinion?
11/17/2017 at 6:47 AM #53080Hi all, I open a new topic for discuss an specific strategy I wrote
https://www.prorealcode.com/topic/double-top-bottom-hunter/
04/29/2018 at 5:26 PM #69383hello what’s the name of this indicator on MY4 please ?
04/30/2018 at 7:37 AM #69406@Elsborgtrading How is the harmonic patterns looking in backtest? 🙂
05/01/2018 at 8:55 AM #69542
@elsborgtrading How is the harmonic patterns looking in backtest?Kasper Elsborg has not been seen around these parts for nearly 12 months (?).
I’d love to know how he (and a few other defectors to MT4 etc) have got on in their pastures new?? 🙂
Jebus, maybe your message will lure Kasper back here to sniff our grass and smell the Nicolas coffee pot again!? 🙂 🙂
05/02/2018 at 1:10 PM #69643@grahal ok you got me 🙂 I did some trading again on demo accounts on MT4 using some of the hamonic pattern indicators. I traded manual, so no backtest is available. I still believe in the power of these patterns, however I lost interest in trading- simply because I lost it all to IG. yes yes I know- every successful trader must lose 90% of his money before being profitable. I don’t think daytrading is for me, nor Boting with prorealtime, before they at least make multiframe available and volume.. etc, etc… There are a reason these things has not been implemented yet. because it not in IG’s favor. IG is not your friend- when you lose money, they win it. simple as that. However studying the harmonic pattern I started to look at crypto in the big FOMO fase in dec-jan. not the best entry time overall for any crypto. (note: I have never seen such a clear FUD and propaganda scam before. all year every media and was leading up to this moment, and the big fish dropped everything on the little people. it was so clear) So I waited, because I could also see through harmonics that it was about to crash. So I waited and planned my trades- I’ve made 7 long trades since January 17th and are atm up 15-25% depending on the day. I also did some more buy&hold for my pension fond doing my strategy from a former post it up 10% last year. So finally I’m profitable. here is the forecast I made on XRP 5th jan- and waited
Regards Kasper
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on