Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

derek2209

EasyLanguage Convolution Indicator by John F. Ehlers

Recommended Posts

Hi Traderslaboratory

 

In John F Ehlers Book " Cycle-Analytics-for-Traders "

The EasyLanguage code to compute the Convolution indicator is given in

Code Listing 13-1.

EasyLanguage Code to Compute and Display Convolution

 

/////////////////////////////////////////////////////////////////////////////

the line in the book and below is incomplete

i.e.

<<< If Filt[intPortion(.5*N)] < Filt Convolution[N] = (1 + (ExpValue Blank >>>

 

To get Indicator to run inserted the line below

 

<<< If (IntPortion(.5*N))>Filt then Convolution[N]=(1+ExpValue(N)); >>>

Could someone please correct this effort

///////////////////////////////////////////////////////////////////////////

 

See attached pdf " Ehlers Convolution Indicator" for the original code

 

Thank you in advance

Derek

 

The EasyLanguage code to compute the Convolution 
indicator is given in Code Listing 13-1. 
Code Listing 13-1.
EasyLanguage
Code to Compute
and Display
Convolution
{ Convolution Indicator 
(c) 2013 John F. Ehlers 

} 
Inputs: 
ShortestPeriod(40), 
LongestPeriod(80); 
Vars: 
alpha1(0), 
HP(0), 
a1(0), 
b1(0), 
c1(0), 
c2(0), 
c3(0), 
Filt(0), 
N(0), 
II(0), 
X(0), 
Y(0), 
Sx(0), 
Sy(0), 
Sxx(0), 
Syy(0), 
Sxy(0), 
Color1(0), 
Color2(0), 
Color3(0); 
Arrays: 

Corr[48](0), 
Slope[48](0), 
Convolution[48](0); 
//HighPass filter cyclic component 
alpha1 = (Cosine(1.414*360 / Longe 
HP = (1 - alpha1 / 2)* 
(1 - alpha1 / 2)* 
(Close - 2*Close[1] + Close[2]) + 
(1 - alpha1)*HP[1] - (1 - alpha1)* 
(1 - alpha1)*HP[2]; 
//Smooth with a Super Smoother Fil 
a1 = expvalue(-1.414*3.14159 / Sho
b1 = 2*a1*Cosine(1.414*180 / Short
c2 = b1;
c3 = -a1*a1;
c1 = 1 - c2 - c3;
Filt = c1*
(HP + HP[1]) / 2 + c2*Filt[1] + c3

For N = 1 to 48 Begin 
Sx = 0; 
Sy = 0; 
Sxx = 0; 
Syy = 0; 
Sxy = 0; 
For II = 1 to N Begin
X = Filt[iI - 1];
Y = Filt[N - II];
Sx = Sx + X;
Sy = Sy + Y;
Sxx = Sxx + X*X;
Sxy = Sxy + X*Y;
Syy = Syy + Y*Y; 
End; 
If (N*Sxx - Sx*Sx)*
(N*Syy - Sy*Sy) > 0 Then Corr[N] =
(N*Syy - Sy*Sy)); 
Slope[N] = 1; 

{//////////////////////////////////////////////////////////////////////////////////////////

In John  F Ehlers Book  " Cycle-Analytics-for-Traders"
The EasyLanguage code to compute the Convolution indicator is given in Code Listing 13-1.

the line in the book and below is incomplete
i.e.
<<<  If Filt[intPortion(.5*N)] < Filt Convolution[N] = (1 + (ExpValue  >>>

To get Indicator to run   substitued the line below

<<<  If (IntPortion(.5*N))>Filt then Convolution[N]=(1+ExpValue(N));  >>>
Could someone please correct this effort

/////////////////////////////////////////////////////////////////////////////////////////////}


If (IntPortion(.5*N))>Filt then Convolution[N]=(1+ExpValue(N));
End;
//Plot as a Heatmap
For N = 3 to 48 Begin 
If Slope[N] > 0 Then Begin

Color1 = 255*Convolution[N];
Color2 = 0; 
End; 
If Slope[N] < 0 Then Begin
Color1 = 0;
Color2 = 255*Convolution[N]; 
End; 
Color3 = 0; 
If N = 2 Then Plot2[4]
(2, “S2”, RGB(Color1, Color2, Colo 
If N = 3 Then Plot3[4]
(3, “S3”, RGB(Color1, Color2, Colo 
If N = 4 Then Plot4[4]
(4, “S4”, RGB(Color1, Color2, Colo 
If N = 5 Then Plot5[4]
(5, “S5”, RGB(Color1, Color2, Colo 
If N = 6 Then Plot6[4]
(6, “S6”, RGB(Color1, Color2, Colo 
If N = 7 Then Plot7[4]
(7, “S7”, RGB(Color1, Color2, Colo 
If N = 8 Then Plot8[4]
(8, “S8”, RGB(Color1, Color2, Colo 
If N = 9 Then Plot9[4]
(9, “S9”, RGB(Color1, Color2, Colo 
If N = 10 Then Plot10[4]
(10, “S10”, RGB(Color1, Color2, Co 
If N = 11 Then Plot11[4]
(11, “S11”, RGB(Color1, Color2, Co 
If N = 12 Then Plot12[4]

(12, “S12”, RGB(Color1, Color2, Co 
If N = 13 Then Plot13[4] 
(13, “S13”, RGB(Color1, Color2, Co 
If N = 14 Then Plot14[4] 
(14, “S14”, RGB(Color1, Color2, Co 
If N = 15 Then Plot15[4] 
(15, “S15”, RGB(Color1, Color2, Co 
If N = 16 Then Plot16[4] 
(16, “S16”, RGB(Color1, Color2, Co 
If N = 17 Then Plot17[4] 
(17, “S17”, RGB(Color1, Color2, Co 
If N = 18 Then Plot18[4] 
(18, “S18”, RGB(Color1, Color2, Co 
If N = 19 Then Plot19[4] 
(19, “S19”, RGB(Color1, Color2, Co 
If N = 20 Then Plot20[4] 
(20, “S20”, RGB(Color1, Color2, Co 
If N = 21 Then Plot21[4] 
(21, “S21”, RGB(Color1, Color2, Co 
If N = 22 Then Plot22[4] 
(22, “S22”, RGB(Color1, Color2, Co 
If N = 23 Then Plot23[4] 
(23, “S23”, RGB(Color1, Color2, Co 
If N = 24 Then Plot24[4] 
(24, “S24”, RGB(Color1, Color2, Co 
If N = 25 Then Plot25[4] 
(25, “S25”, RGB(Color1, Color2, Co 
If N = 26 Then Plot26[4] 
(26, “S26”, RGB(Color1, Color2, Co 

If N = 27 Then Plot27[4] 
(27, “S27”, RGB(Color1, Color2, Co 
If N = 28 Then Plot28[4] 
(28, “S28”, RGB(Color1, Color2, Co 
If N = 29 Then Plot29[4] 
(29, “S29”, RGB(Color1, Color2, Co 
If N = 30 Then Plot30[4] 
(30, “S30”, RGB(Color1, Color2, Co 
If N = 31 Then Plot31[4] 
(31, “S31”, RGB(Color1, Color2, Co 
If N = 32 Then Plot32[4] 
(32, “S32”, RGB(Color1, Color2, Co 
If N = 33 Then Plot33[4] 
(33, “S33”, RGB(Color1, Color2, Co 
If N = 34 Then Plot34[4] 
(34, “S34”, RGB(Color1, Color2, Co 
If N = 35 Then Plot35[4] 
(35, “S35”, RGB(Color1, Color2, Co 
If N = 36 Then Plot36[4] 
(36, “S36”, RGB(Color1, Color2, Co 
If N = 37 Then Plot37[4] 
(37, “S37”, RGB(Color1, Color2, Co 
If N = 38 Then Plot38[4] 
(38, “S38”, RGB(Color1, Color2, Co 
If N = 39 Then Plot39[4] 
(39, “S39”, RGB(Color1, Color2, Co 
If N = 40 Then Plot40[4] 
(40, “S40”, RGB(Color1, Color2, Co 
If N = 41 Then Plot41[4] 

(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 42 Then Plot42[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 43 Then Plot43[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 44 Then Plot44[4] 
( 4, “S 4”, RGB(Color1, Color2, Co 
If N = 45 Then Plot45[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 46 Then Plot46[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 47 Then Plot47[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
If N = 48 Then Plot48[4] 
(4 , “S4 ”, RGB(Color1, Color2, Co 
End; 

Ehlers Convolution.pdf

Edited by derek2209

Share this post


Link to post
Share on other sites

Derek,

 

I think you may have to buy the book. The PDF you posted is cropped on the right after ~30 chars so who knows what else may be missing...

 

What happens when you run your

"If (IntPortion(.5*N))>Filt then Convolution[N]=(1+ExpValue(N));"

version?

'Filt' is a function call. You'd have to have the code for that to get this working...

 

Have you found complete .pla code for this? Your missing code and the Filt function might be an easy translation

 

Here is a contact who may be able to get you all the original code... He no longer uses TS so emphasis on may be

John Ehlers code links

 

hth

 

zdo

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • XRP trading: Still Bearish, Ripple May Bounce Up After Testing a Close Support   Ripple (XRP) Price Analysis – April 16 Regardless of the current green market, XRPUSD bearish sentiment moves in a descending channel with a slow price action towards close support. XRPBTC, on the other hand, has further fallen in a new direction. Still, XRP market is falling.   XRP/USD Market Key Levels: Resistance levels: $0.35, $0.37, $0.39 Support levels: $0.30, $0.28, $0.26   Looking at the medium-term chart, Ripple appeared bearish as price trades within a descending channel in since early April. While sitting at the lower channel, XRPUSD market has been consolidating for the past five days as a swing high is expected at $0.35 resistance level. A further push above the mentioned resistance may resume XRP on a bullish trend.   Meanwhile, a possible swing low could plummet price to $0.3 support and beyond. Evidently, the trend lines are still a defensive line for the bulls and the bears.   Viewing the 4-hours RSI, a gradual buying momentum is compounding as it points upward. More importantly, the 4-hours Stochastic RSI pressure nears overbought territory. A slight drop is likely once the indicator reaches the overbought zone. Nevertheless, XRPUSD market is still respecting a descending channel pattern.   XRP/BTC Market Ripple, as a hedge, is on a downtrend trend. The massive sell-off in early April has led the sellers to more significant downward movement as price faces 6000 SAT low.The coin’s value is dramatically depreciating as a new low is yet to be established. The bearish scenario is now revealed to be strong; following a new purple line.   Since the drop, the 4-hours RSI has positioned trading below the 50 level; currently swinging on the oversold line. A clear breach above the purple trend line could fly price to 6600 SAT resistance and above.   The current 4-hours Stochastic RSI faces the oversold zone; showing an ongoing selling pressure. A long position may switch the Oscillator on an upside trend. At the moment, the sellers are gaining control of the market.     Please note: insidebitcoins.com is not a financial advisor. Do your own research before investing your funds in any financial asset or presented product or event. We are not responsible for your investing results.   How to trade Bitcoin successfully:  https://insidebitcoins.com/trading/bitcoin       Best cryptos exchanges:  https://insidebitcoins.com/cryptocurrency-exchanges  
    • Hello colleagues I found an automatic strategy that trades on Ichimoku. I got a trial, interesting work with Renko charts ,where only the closing prices of Renko are perceived. The results of my testing on the tick history for the entire period of downloading I apply, the settings were provided by the author of the strategy.  Has anyone else tried it?  What you think ? Their site amntrader.com 
    • Date : 18th April 2019. MACRO EVENTS & NEWS OF 18th April 2019.FX News Today 10-year Treasury yields corrected -2.7 bp to 2.567% and JGB yields are down -1.4 bp at -0.0033%. Asian bonds were generally supported, as stock markets sentiment turned sour again, with South Korean paper underperforming after the BoK left interest rates unchanged, but cut its growth and inflation forecast to 2.5% and 1.1% respectively. Record household debt was one of the factors holding the BoK back from cutting rates for now, and South Korea’s 10-year yield jumped 5.9 bp as the bank tried to calm recession fears. Stock markets generally corrected from the six months high seen yesterday with uninspiring corporate earnings and problems with a new Samsung phone preventing further gains for now. Topix and Nikkei lost -0.96% and -0.80% respectively, after Wall Street closed with slight losses. The Hang Seng is down -0.58%, CSI 300 and Shanghai Comp down -0.44% and -0.39% respectively. The ASX dropped -0.10% and US stock futures are also broadly lower, suggesting ongoing pressure on markets. The front end WTI future meanwhile is trading at USD 63.77 per barrel. Charts of the Day Technician’s Corner EURUSD is still trading around the 1.13 level, and in a channel with key Resistance at 1.1320 and Support at 1.1279. Both are still strong after having bounced yesterday. Indicators are issuing mixed signals. GBPUSD has been stable around the 1.30 level, still unable to break through, fluctuating between the 1.3067-1.3026 Resistance and Support levels. Indicators are giving positive signals. USDJPY started the day below 112.00 mark, as indicators are suggesting a downwards movement. Support remains at 111.80. XAUUSD is trading at year-to-date lows, after breaking through the 1275 Support level. 1270 is the next Support level, with indicators are showing signs of stabilization. Main Macro Events Today EU PMIs (EUR, GMT 08:00) – Manufacturing and Composite PMIs are expected to increase in April, to 47.9 and 51.8 respectively while the Services PMI is forecasted to have remained at 53.3. Retail Sales ex Fuel (GBP, GMT 08:30) – UK Retail Sales ex Fuel are expected to have increased to 4% y/y, compared to 3.8% y/y in March. Retail Sales ex Autos (USD, GMT 12:30) – Retail Sales are expected to have increased to 0.4% in March, up from the negative 0.2% surprise in February. Retail Sales (CAD, GMT 12:30) – Retail Sales are forecasted to have registered an increase in Canada as well, to 0.2% compared to 0.1% in January. Philly Fed Index (USD, GMT 12:30) – Philly Fed index is expected to have eased to 10.3 compared to 13.7 in March. Markit PMIs (USD, GMT 13:45) – Mixed signals are expected from the PMI release, as Manufacturing is expected to have increased to 52.8 from 52.4, while the Services PMI is expected to have declined to 55 from 55.3. Support and ResistanceAlways trade with strict risk management. Your capital is the single most important aspect of your trading business.Please note that times displayed based on local time zone and are from time of writing this report.Click HERE to access the full HotForex Economic calendar.Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE!Click HERE to READ more Market news. Dr Nektarios Michail Market Analyst HotForex Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • Hi all does anyone use forex signals here? i want to try some out but not sure if its worth paying for it or just use free ones. anyone got recommendation for signal providers?
    • Hello, Samuel. I am a new member to this forum. Great to be here.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.