Ehlers' Sinewave Indicator
Forums › ProRealTime English forum › ProBuilder support › Ehlers' Sinewave Indicator
- This topic has 26 replies, 1 voice, and was last updated 3 years ago by Suzu Yuk.
-
-
08/19/2016 at 8:01 AM #11864
Hi all.
Is there somebody that can convert John Ehlers’ Sinewave Indicator forPRT usage? This is the EasyLanguage code:
{*****************************************************
Sinewave Indicator
*****************************************************}
Inputs: Price((H+L)/2),
alpha(.07);
Vars: Smooth(0),
Cycle(0),
I1(0),
Q1(0),
I2(0),
Q2(0),
DeltaPhase(0),
MedianDelta(0),
MaxAmp(0),
AmpFix(0),
Re(0),
Im(0),
DC(0),
alpha1(0),
InstPeriod(0),
DCPeriod(0),
count(0),
SmoothCycle(0),
RealPart(0),
ImagPart(0),
DCPhase(0);
Smooth = (Price + 2*Price[1] + 2*Price[2]
+ Price[3])/6;Cycle = (1 – .5*alpha)*(1 – .5*alpha)*(Smooth
-2*Smooth[1] + Smooth[2]) + 2*(1 – alpha)*Cycle[1]
-(1 – alpha)*(1 – alpha)*Cycle[2];If currentbar < 7 then Cycle = (Price – 2*Price[1]
+ Price[2]) / 4;{Cycle = Price;}
Q1 = (.0962*Cycle + .5769*Cycle[2] – .5769*Cycle[4]
-.0962*Cycle[6])*(.5 + .08*InstPeriod[1]);I1 = Cycle[3];
If Q1 <> 0 and Q1[1] <> 0 then DeltaPhase = (I1/Q1
-I1[1]/Q1[1]) / (1 + I1*I1[1]/(Q1*Q1[1]));
FIGURE 11.2 EasyLanguage Code to Compute the Sinewave Indicator
The Sinewave Indicator 155
If DeltaPhase < 0.1 then DeltaPhase = 0.1;
If DeltaPhase > 1.1 then DeltaPhase = 1.1;
MedianDelta = Median(DeltaPhase, 5);
If MedianDelta = 0 then DC = 15 else DC = 6.28318 /
MedianDelta + .5;
InstPeriod = .33*DC + .67*InstPeriod[1];
Value1 = .15*InstPeriod + .85*Value1[1];
{Compute Dominant Cycle Phase}
DCPeriod = IntPortion(Value1);
RealPart = 0;
ImagPart = 0;
For count = 0 To DCPeriod – 1 begin
RealPart = RealPart + Sine(360 * count
/ DCPeriod) * (Cycle[count]);
ImagPart = ImagPart + Cosine(360 * count
/ DCPeriod) * (Cycle[count]);
End;
If AbsValue(ImagPart) > 0.001 then DCPhase
= Arctangent(RealPart / ImagPart);
If AbsValue(ImagPart) <= 0.001 then DCPhase = 90
* Sign(RealPart);
DCPhase = DCPhase + 90;
If ImagPart < 0 then DCPhase = DCPhase + 180;
If DCPhase > 315 then DCPhase = DCPhase – 360;
Plot1(Sine(DCPhase), “Sine”);
Plot2(Sine(DCPhase + 45), “LeadSine”);08/19/2016 at 12:34 PM #11872Hi Renato,
Do this one the same? : http://www.prorealcode.com/prorealtime-indicators/even-better-sinewave/
I believe not, but just to be sure? If not, I can of course convert it to prorealtime.
08/19/2016 at 2:31 PM #11884Hi Nicholas
No, I had already seen this one and it is not the same; the Ehlers’ script that I forwarded is much more complicated.
Thanks for your dedication to the cause LOL.
Renato
08/19/2016 at 2:49 PM #11887I found a lot of Ehlers’ stuff on HK-Lisse website:
MESA period indicator :
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273REM TRENDLINE DE J. EHLERSREM Indicateur "MESA PERIODE"REM Calcul de la période du cycle dominantPRIX = (high + low) / 2IF Barindex <= 5 THENPERIODE = 0V5 = 0ENDIfIF Barindex > 5 THEnREM Détermination de la phase de chaque ticV1 = PRIX - PRIX[6]V2 = V1[3]V3 = 0.75*(V1-V1[6])+0.25*(V1[2]-v1[4])ENPHASE = 0.33*V2+0.67*ENPHASE[1]ENQUADRATURE = 0.2*V3 + 0.8*ENQUADRATURE[1]IF ABS(ENPHASE + ENPHASE[1]) > 0 THENA = ABS((ENQUADRATURE + ENQUADRATURE[1]) / (ENPHASE+ENPHASE[1]))PHASEDEG = ATAN(A)endifREM Correction si autres quadrantsIF ENPHASE < 0 AND ENQUADRATURE > 0 THENPHASEDEG = 180 - PHAsedegendifIF ENPHASE < 0 AND ENQUADRATURE < 0 THENPHASEDEG = 180 + PHASEDegendifIF ENPHASE > 0 AND ENQUADRATURE < 0 THENPHASEDEG = 360 - PHASedegendifREM Phase différentielle et corrections éventuellesDELTAPHASE = PHASEDEg[1]-phasedegIF PHASEDEG[1] < 90 AND PHASEDEG > 270 THENDELTAPHASE = 360 + DELTaphaseendifIF DELTAPHASE < 1 THENDELTAPhase=1endifIF DELTAPHASE > 60 THENDELTAphase=60endifREM Calcul de la période instantanée du cycle actuelREM et correction éventuellePERIODEINSTANT = 0V4 = 0J = 0WHILE J<41V4 = V4 + DELTAPHASE[J]IF V4>360 AND PERIODEINSTANT=0 THENPERIODEINSTANT =JENDIFJ=J+1WENDIF PERIODEINSTANT=0 THENPERIODEINSTANT = PERIODEINSTANT[1]ENDIFREM Calcul de la PERIODEV5 = 0.25 * PERIODEINSTANT +0.75*V5[1]periode=v5ENDIFRETURN PERIODE as "PERIODE" , DELTAPHASE as "deltaphase"MESA PHASE INDICATOR :
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950REM TRENDLINE DE J. EHLERSREM Indicateur "MESA PHASE"REM Calcul de la phase du cycle dominantIF Barindex > 5 THENPRIX = (high + low) / 2myPERIODE, myDELTAPHASE = CALL "MESA PERIODE"PERIODE = ROUND(myPERIODE)PARTIEREELLE = 0PARTIEIMAGINAIRE = 0K = 0REM Calcul en degrésWHILE K < PERIODEPARTIEREELLE = PARTIEREELLE + SIN(360*K/PERIODE)*PRIX[K]PARTIEIMAGINAIRE = PARTIEIMAGINAIRE + COS(360*K/PERIODE)*PRIX[K]K = K+1WENDIF ABS(PARTIEIMAGINAIRE) > 0.001 THENDCPHASEDEG = ATAN(PARTIEREELLE/PARTIEIMAGINAIRE)ENDIFIF ABS(PARTIEIMAGINAIRE) <= 0.001 THENIF PARTIEREELLE >= 0 THENSIGNEPARTIEREELLE=1ELSESIGNEPARTIEREELLE=-1ENDIFDCPHASEDEG = 90*SIGNEPARTIEREELLEENDIFDCPHASEDEG = DCPHASEDEG + 90IF PARTIEIMAGINAIRE<0 THENDCPHASEDEG = DCPHASEDEG + 180ENDIFIF DCPHASEDEG>315 AND DCPHASEDEG<=360 and myDELTAPHASE <> 500 THENDCPHASEDEG = DCPHASEDEG - 360ENDIFPHASE = DCPHASEDEGENDIFRETURN PHASE as "PHASE"MESA RSB :
1234567891011121314151617181920212223242526272829303132333435REM Indicateur "MESA RSB"REM Calcul du rapport signal / bruit (RSB en dB)REM Ajout ligne horizontale = 6IF Barindex <= 8 THENRSB = 0RANGERSB = 0ENPHASE = 0ENQUADRATURE = 0ENdifIF Barindex > 8 THEnPRIX = (high + low) /2REM Détermination des composantes en phase et en quadratureREM Transformation de HilbertRANGERSB = 0.2*(high - low) + 0.8*RANGERSB[1]V1 = PRIX-PRIX[6]V2 = V1[3]V3 = 0.75*(V1-V1[6]) + 0.25*(V1[2]-V1[4])ENPHASE = 0.33*V2 + 0.67*ENPHASE[1]ENQUADRATURE = 0.2*V3 + 0.8*Enquadrature[1]REM Lissage du rapport signal/bruitV2 = 0.2*(square(ENPHASE) + square(ENQUADRATURE)) + 0.8*V2[1]REM Calcul du rapport signal/bruit lisséIF V2<0.001 THENV2=0.001endifIF RANGE>0 THENRSB = 0.25*(10* LOG(V2 / square(RANGERSB)) / LOG(10)+4.7) + 0.75*RSB[1]ENDifendifRETURN RSB as "Rapport Signal-Bruit"MESA SINEWAVE INDICATOR :
1234567891011121314REM TRENDLINE DE J. EHLERSREM Indicateur "MESA SINEWAVE"REM Calcul du SINEWAVE et du LEAD_SINEWAVEREM Sinus de la phase et ce même sinus avancé de 45°myPHASE = CALL "MESA PHASE"IF Barindex > 5 THENPHASE = myPHASESINEWAVE = SIN(PHASE)LEADSINEWAVE = SIN(PHASE + 45)ENDifRETURN SINEWAVE as "SINEWAVE" , LEADSINEWAVE as "LEAD SINEWAVE"MESA TRENDLINE indicator :
12345678910111213141516171819202122232425262728293031REM TRENDLINE DE J. EHLERSREM Indicateur "MESA TRENDLINE"REM Calcul de la TRENDLINE et du FILTRE DE KALMANREM Utilisés comme 2 moyennes mobiles adaptatives en mode TendanceIF Barindex > 5 THENPRIX = (high + low) /2myPERIODE, myDELTAPHASE = CALL "MESA PERIODE"PERIODE = ROUND(myPERIODE)TRENDLINE = 0J =0WHILE J < PERIODE+2TRENDLINE = TRENDLINE + PRIX[J]J = J+1wendIF PERIODE>0 THENTRENDLINE = TRENDLINE / (PERIODE+2)endifREM Filtre de Kalman zero lagKALMAN = 0.33*(PRIX + 0.5*(PRIX - PRIX[3])) + 0.67*Kalman[1]IF Barindex<26 and myDELTAPHASE <> 500 THENTRENDLINE = PRIXKALMAN =prixENDIfendifRETURN TRENDLINE as "TRENDLINE" , KALMAN as "KALMan"MESA trend cycle :
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849REM TRENDLINE DE J. EHLERSREM Indicateur "MESA CYCLE TENDANCE"REM Essai de détermination du mode cycle ou tendanceREM Variable P1 = 0.3myPERIODE, myDELTAPHASE = CALL "MESA PERIODE"mySINEWAVE, myLEADSINEWAVE = CALL "MESA SINEWAVE"myTRENDLINE, myKALMAN = CALL "MESA TRENDLINE"myRapportSignalBruit = CALL "MESA RSB"P = myPERIODEDEL = myDELTAPHASES = mySINEWAVELS = myLEADSINEWAVETL = myTRENDLINEK = myKALMANRSB = myRapportSignalBruitTENDANCE=1CYCLES=0REM Détecter un croisement LS/S et initialiser le mode cycle si RSB suffisantIF LS crosses over S OR LS crosses under S AND RSB>6 THENTENDANCE=0CYCLES=1ENDIfREM Vérifier progressivité de la variation de la phaseIF P<>0 AND DEL>(1-P1)*360 / P AND DEL<(1+P1)*360 / P THENTENDANCE=0CYCLES=1endifREM Détecter un croisement K/TL et initialiser le compteur de joursIF K crosses over TL OR K crosses under TL THENNB=0endifREM Incrémenter compteur de joursNB=nb+1REM Confirmer mode cycle si compteur < une demi-période, sinon tendanceIF NB<P/2 THENCYCLES=1TENDANCE=0ELSECYCLEs=0tendance=1endifRETURN CYCLES as "CYCLES", TENDANCE as "TENDANCE"I haven’t test anything. Don’t really know if it’s personal work or original Ehlers indicators. If it’s not, please tell me and I’ll convert your given code.
This is the URL where I found these prorealtime codes: http://hk-lisse.over-blog.com/article-16635860.html
1 user thanked author for this post.
08/19/2016 at 3:54 PM #1189512345678910111213141516REM TRENDLINE DE J. EHLERSREM Indicateur "MESA SINEWAVE"REM Calcul du SINEWAVE et du LEAD_SINEWAVEREM Sinus de la phase et ce même sinus avancé de 45°myPHASE = CALL "MESA PHASE"IF Barindex > 5 THENPHASE = myPHASESINEWAVE = SIN(PHASE)LEADSINEWAVE = SIN(PHASE + 45)ENDifMA = weightedaverage [4](LEADSINEWAVE)RETURN SINEWAVE as "SINEWAVE" , LEADSINEWAVE as "LEAD SINEWAVE" , 0 as " zero " , 0.8 as " 0.8 " , - 0.8 as " - 0.8 " , MA as " MA LEADSINEWAVE "// Elhers préconise une WMA p = 408/20/2016 at 7:56 AM #11934Thanks Nicholas, thanks Supertiti.
Very kind of you.
Renato
02/09/2017 at 3:07 PM #24496Hi Renato,
I am also very interested in the Hilbert Sine Wave indicator by John Ehler and I would like to be able to use this with PRT. There is the “Better Hilbert Sine Wave indicator” by emini-watch.com, which is only available for TradeStation. I expect you have seen this, but if not here is the link – http://emini-watch.com/trading-indicators/hilbert-sine-wave/
It would be perfect to have a version of this for PRT. Have you tested the code that Nicolas very kindly provided? Did he manage to code the EasyLanguage code that you provided?
Regards,
Tony
1 user thanked author for this post.
10/27/2017 at 12:22 PM #50707Found this ok eklablog but cant get it to work
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192REM Computer InPhase & Quadrature Componentsv1=pri-pri[6]v2=v1[3]v3=0.75*(v1-v1[6])+0.25*(v1[2]-v1[4])InPhase=0.33*v2+0.67*InPhase[1]Quadrature=0.2*v3+0.8*Quadrature[1]REM Use Arc Tangent To Compute The Current PhaseIf ABS(InPhase+InPhase[1]) > 0 ThenX=ABS((Quadrature+Quadrature[1])/(InPhase+InPhase[1]))Phase=ATAN(X)EndifREM Resolve Arc Tangent AmbiguityIf InPhase < 0 And Quadrature > 0 ThenPhase=180-PhaseEndifIf InPhase < 0 And Quadrature < 0 ThenPhase=180+PhaseEndifIf InPhase > 0 And Quadrature < 0 ThenPhase=360-PhaseEndifREM Compute A Differential PhaseDeltaPhase=Phase[1]-PhaseIf Phase[1] < 90 And Phase > 270 ThenDeltaPhase=360+Phase[1]-PhaseEndifIf DeltaPhase < 1 ThenDeltaPhase=1EndifIf DeltaPhase > 60 ThenDeltaPhase=60EndifREM Sum DeltaPhase To Reach 360 DegreesInstPeriod=0v4=0For count=0 To 40v4=v4+DeltaPhase[count]If v4 > 360 And InstPeriod=0 ThenInstPeriod=countEndifNextREM Resolve InstPeriod Errors & SmoothIf InstPeriod=0 ThenInstPeriod=InstPeriod[1]Endifv5=0.25*InstPeriod+0.75*Period[1]REM Compute Dominant Cycle PhasePeriod=Round(v5)RealPart=0ImagPart=0For count=0 To Period-1RealPart=RealPart+Sin(360*count/Period)*(pri[count])ImagPart=ImagPart+Cos(360*count/Period)*(pri[count])NextIf ABS(ImagPart) > 0.001 ThenDCPhase=ATAN(RealPart/ImagPart)EndifIf ABS(ImagPart) <= 0.001 ThenDCPhase=90*SGN(RealPart)EndifDCPhase=DCPhase+90If ImagPart < 0 ThenDCPhase=DCPhase+180EndifIf DCPhase > 315 And DCPhase <=360 ThenDCPhase=DCPhase-360EndifSine=Sin(DCPhase)Lead=Sin(DCPhase+45)EndifReturn Sine as "Hilbert Sinewave", Lead as "Leadsine"10/27/2017 at 12:50 PM #50714I don’t know if it should look like this, but this is a fixed code:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596pri=customcloseif barindex>20 thenREM Computer InPhase & Quadrature Componentsv1=pri-pri[6]v2=v1[3]v3=0.75*(v1-v1[6])+0.25*(v1[2]-v1[4])InPhase=0.33*v2+0.67*InPhase[1]Quadrature=0.2*v3+0.8*Quadrature[1]REM Use Arc Tangent To Compute The Current PhaseIf ABS(InPhase+InPhase[1]) > 0 ThenX=ABS((Quadrature+Quadrature[1])/(InPhase+InPhase[1]))Phase=ATAN(X)EndifREM Resolve Arc Tangent AmbiguityIf InPhase < 0 And Quadrature > 0 ThenPhase=180-PhaseEndifIf InPhase < 0 And Quadrature < 0 ThenPhase=180+PhaseEndifIf InPhase > 0 And Quadrature < 0 ThenPhase=360-PhaseEndifREM Compute A Differential PhaseDeltaPhase=Phase[1]-PhaseIf Phase[1] < 90 And Phase > 270 ThenDeltaPhase=360+Phase[1]-PhaseEndifIf DeltaPhase < 1 ThenDeltaPhase=1EndifIf DeltaPhase > 60 ThenDeltaPhase=60EndifREM Sum DeltaPhase To Reach 360 DegreesInstPeriod=0v4=0For count=0 To 40v4=v4+DeltaPhase[count]If v4 > 360 And InstPeriod=0 ThenInstPeriod=countEndifNextREM Resolve InstPeriod Errors & SmoothIf InstPeriod=0 ThenInstPeriod=InstPeriod[1]Endifv5=0.25*InstPeriod+0.75*Period[1]REM Compute Dominant Cycle PhasePeriod=Round(v5)RealPart=0ImagPart=0For count=0 To Period-1RealPart=RealPart+Sin(360*count/Period)*(pri[count])ImagPart=ImagPart+Cos(360*count/Period)*(pri[count])NextIf ABS(ImagPart) > 0.001 ThenDCPhase=ATAN(RealPart/ImagPart)EndifIf ABS(ImagPart) <= 0.001 ThenDCPhase=90*SGN(RealPart)EndifDCPhase=DCPhase+90If ImagPart < 0 ThenDCPhase=DCPhase+180EndifIf DCPhase > 315 And DCPhase <=360 ThenDCPhase=DCPhase-360EndifSine=Sin(DCPhase)Lead=Sin(DCPhase+45)endifReturn Sine as "Hilbert Sinewave", Lead as "Leadsine"12/01/2018 at 2:11 PM #86147Hello
I have found an interesting concept on this website (it is not an advertising, just a link to the concept)
https://www.pro-indicators.com/pro-indicators—sinewave—momentum-on-tradingview-en.html
I am manually trading cycle of Elliot Waves
The idea of trading sinewave cycles combined with other information is smart.
I would like to build a screener based on
-sinewave cycles
-momentum (divergence)
-price pattern : Demark count 9 /13 , or high volume , candlestick patterns, POC on market profile
-fibonnaci retracement of previous trend
Is there anybody who tried to code this kind of indicator / screener?
Regards
12/26/2018 at 11:51 AM #87646I have worked on
-cycle on adaptative stochastic
-basic candle sticks : Low/High reversal, Extreme Reveral, Reversal
It give some results
I will try to add
-better volume indicator
-momentum filtration
1 user thanked author for this post.
03/21/2020 at 7:09 PM #122865Hello Nicolas,
I was attempting to improve/replace the conditions in Candle Reverse Sinewave and use a (fractal) reversal of this original line of code:
3 bar rounding bottom1234if ScanBuyCondition thenif low[1]<Low[2] and Low[1]<low[0] thenDRAWARROWUP(barindex[1],low[1])coloured(76,153,0)Endifusing lines from this Fractal code:
https://www.prorealcode.com/topic/calculating-diagonal-trend-lines-using-fractals-and-trigonometry/page/2/#post-59358Fractal Reverse1234567891011121314151617181920212223242526272829303132333435363738defparam calculateonlastbars=10000//Calculate Fractal (Swing Point)once FracH = 0 //initialize fractal countonce FracL = 0 //initialize fractal countFor i = 0 to 4 DoIf high[2] > high[i] Then //look for high fractal with 2 lower highs on either sideFracH = FracH + 1EndIfIf low[2] < low[i] Then //look for low fractal with 2 higher lows on either sideFracL = FracL + 1EndIfNextIf FracH = 4 Then //High Fractal IdentifiedIf Bear = 0 and Bull = 0 ThenBear = 1 //Initialize first trend directionEndIfFractalH = high[2] //High Fractal Price LevelFractalP = barindex - 2 //High Fractal Bar PositionEndIfIf FracL = 4 Then //Low Fractal IdentifiedIf Bear = 0 and Bull = 0 ThenBull = 1 //Initialize first trend directionEndIfFractalL = low[2] //Low Fractal Price LevelFractalP = barindex - 2 //Low Fractal Bar PositionEndIfFracH = 0 //reset fractal countFracL = 0 //reset fractal countHow do I correct the syntax below to get it to draw the green arrows when this line: FracL = FracL + 1 is used?
Williams Fracta Bottom123456789101112131415//Calculate Fractal (Swing Point)once FracH = 0 //initialize fractal countonce FracL = 0 //initialize fractal countFor i = 0 to 4 Doif ScanBuyCondition thenIf low[2] < low[i] Then //look for low fractal with 2 higher lows on either sideFracL = FracL + 1Endifif FracL thenDRAWARROWUP(barindex[1],low[1])coloured(76,153,0)EndifI’m hoping that this newer coding will produce less false signals than the original, do you think this is the best reversal pattern to use (a 5 bar pattern)?
I’ve have experimented a lot with different Ehler’s Stochastic periods and thresholds (0.01 up to 0.3) and although this is a great indicator (arrows literally on some turning points) there’s just too many false signals (eg, a few green arrows in a falling market) and it still misses some big turning points.
Cheers!
Bard03/21/2020 at 7:12 PM #12286603/22/2020 at 8:33 PM #122956Hi Bard, I literally just scanned through your request. But here is an updated version of the Fractal code above:
12345678910111213141516171819202122232425262728293031323334//Shoulder = 3 //size of shouldersr = ShoulderSize*2once SwingH = 0once SwingL = 0once FractalD = 0For i = 0 to r DoIf high[ShoulderSize] > high[i] or i = ShoulderSize ThenSwingH = SwingH + 1EndIfIf low[ShoulderSize] < low[i] or i = ShoulderSize ThenSwingL = SwingL + 1EndIfNextatr = averagetruerange[r*2]If SwingH = (r+1) and (FractalD = 0 or FractalD = -1) ThenFractalH = high[ShoulderSize]drawtext("▼",barindex[ShoulderSize],FractalH+atr*3,dialog,bold,20) coloured(25,25,112)FractalD = 1EndIfIf SwingL = (r+1) and (FractalD = 0 or FractalD = 1) ThenFractalL = low[ShoulderSize]drawtext("▲",barindex[ShoulderSize],FractalL-atr*3,dialog,bold,20) coloured(176,23,31)FractalD = -1EndIfSwingH = 0SwingL = 0return// FractalH coloured(0,255,0) as "High Fractal", FractalL coloured(255,0,0) as "Low Fractal"03/24/2020 at 4:18 PM #123159Wow! This is is amazing, thanks @Juanj,
I’ve compared your fractal indicator to the modified “reversal point indicator” and my modified version – pls see image 1 of daily S&P 500. Shouldersize =5
The original indicators arrows are bright green and red.
My Univ Osc modified indicator uses dark green and orange arrows and
the fractal indicator uses green and purple triangles.I used a Call code for Ehler’s Universal Oscillator to replace the standard oscillator in the original “reversal point indicator” (my code at the bottom of the comments section of the indicator here: https://www.prorealcode.com/prorealtime-indicators/reversal-point-indicator/)
I had a couple of questions though, I’m just not sure how to do a substitution using the fractal code for this old c3 = lowest[3](low)<lowest[LowestLow](low)[1] etc, line of the code?
And if you wanted to do a simplified creation I was wondering why I set it to Buy when Price = FractalL, it doesn’t produce any trades? Pls see second image.
Also lastly why are the Return Fractal H and Fractal L lines a few bars to the right of the drawarrows on the price chart, i.e. not aligned with the drawarrows?
Thanks again,
Cheers,
Stay safe! -
AuthorPosts
Find exclusive trading pro-tools on