Re: Trend Indicators

1801
mladen wrote: Sat Apr 29, 2017 4:35 am Perfect Trend Line

Preparing this for metatrader 5 and in the process made some upgrades to metatrader 4 version

- new multi time frame mode applied
- new user friendly options
- some code optimization


ptl.png
Hello, can someone please help me? I want to put a box on the same candle wherever the indicator issues a buy or sell signal. And do this only in the Asian session. Thank you.


Re: Trend Indicators for MT4

1802
mrtools wrote: Tue Jul 29, 2025 11:23 pm That indicator is decompiled but think this is close to the same.
Mrtools I am using Supertrend CCI indicator for detecting trend

I had used Coral indicator with coefficient value as 0.08, coral indicator is successfully able to remove wrong signals of ST CCI as shown in image, ST CCI gives early signal compare to coral, if I use coefficient value 0.09 distance between coral and ST cci signal lowers but it effects coral accuracy

Sir your divine help is required to tweak Coral indicator such that signals goes almost inline with ST CCI without impacting Coral accuracy.

Re: Trend Indicators for MT4

1803
srinarayani13 wrote: Wed Jul 30, 2025 8:59 pm Mrtools I am using Supertrend CCI indicator for detecting trend

I had used Coral indicator with coefficient value as 0.08, coral indicator is successfully able to remove wrong signals of ST CCI as shown in image, ST CCI gives early signal compare to coral, if I use coefficient value 0.09 distance between coral and ST cci signal lowers but it effects coral accuracy

Sir your divine help is required to tweak Coral indicator such that signals goes almost inline with ST CCI without impacting Coral accuracy.
Hello, sorry you will have to come up with your own settings what may work for me might not work for you and vice versa.
These users thanked the author mrtools for the post:
srinarayani13

Re: Trend Indicators for MT4

1804
mrtools wrote: Wed Jul 30, 2025 10:28 pm Hello, sorry you will have to come up with your own settings what may work for me might not work for you and vice versa.
Thank you Sir for prompt reply, Sir can you please guide me which will best indicator to follow trend, you have so much experience of coding various indicators, which one is your favorite for trend following

Re: PdfMa AO & AC - Trend Indicators for MT4

1805
global wrote: Fri Jul 18, 2025 4:48 am Here is the PdfMa awesome (mtf) (AO) with some enhancements I added and the Accelerator Oscillator (AC) with matching enhancements, including the PdfMA (Probability Density Function weighted Moving Average) function. I added the UT_ prefix to the names to distinguish my enhanced and modified versions from the originals.

So both the AO and AC are using the PdfMA (Probability Density Function weighted Moving Average) instead of just a SMA (Simple Moving Average). It is deviation from the original AO and AC since in the originals there is no parameter that you can change, but in these versions you can change the variance part of the PdfMA calculation. That way you can get different values for the AO and AC even without changing periods of calculation (the general rule of thumb is : the greater the variance, the smoother the result).


AO and AC Trade Signals:

In both indicators, buffer 5 is the valc buffer and it is labelled as the "Bias" buffer which is used to give you the trade Bias for trade signals.

So if use the variables, PdfMa_AC_Bias to indicate the AC Trade Bias and PdfMa_AO_Bias to indicate the AO Trade bias, then I found that:

A good buy signal is when PdfMa_AC_Bias>2 and the PdfMa_AO_Bias>2 and

A good sell signal is when PdfMa_AC_Bias<-2 and the PdfMa_AO_Bias<-2.

Of course you should use other indicators to confirm those signals. Also, since the AO is much slower than the AC, you may want to speed up the AO a little by either using a 21 "Ma period 2" instead of 34 OR by reducing the "Variance" from 2 to 1.5.


PdfMa AC-AO.png
I am using ! SuperTrend cci (mtf) to find larger trend, when using too far values still indicator is plotting almost same chart I had used cci period 50 with Atr 5 in 1st chart and cci period 2 with ATR 1, comparatively both values are extream different but chart is very much similar

sir can you please code it like you had done for UT_! PdfMa awesome (mtf) indicator, allowing us to change parameters
These users thanked the author srinarayani13 for the post:
Akela


Re: PdfMa AO & AC - Trend Indicators for MT4

1807
global wrote: Fri Jul 18, 2025 4:48 am Here is the PdfMa awesome (mtf) (AO) with some enhancements I added and the Accelerator Oscillator (AC) with matching enhancements, including the PdfMA (Probability Density Function weighted Moving Average) function. I added the UT_ prefix to the names to distinguish my enhanced and modified versions from the originals.

So both the AO and AC are using the PdfMA (Probability Density Function weighted Moving Average) instead of just a SMA (Simple Moving Average). It is deviation from the original AO and AC since in the originals there is no parameter that you can change, but in these versions you can change the variance part of the PdfMA calculation. That way you can get different values for the AO and AC even without changing periods of calculation (the general rule of thumb is : the greater the variance, the smoother the result).


AO and AC Trade Signals:

In both indicators, buffer 5 is the valc buffer and it is labelled as the "Bias" buffer which is used to give you the trade Bias for trade signals.

So if use the variables, PdfMa_AC_Bias to indicate the AC Trade Bias and PdfMa_AO_Bias to indicate the AO Trade bias, then I found that:

A good buy signal is when PdfMa_AC_Bias>2 and the PdfMa_AO_Bias>2 and

A good sell signal is when PdfMa_AC_Bias<-2 and the PdfMa_AO_Bias<-2.

Of course you should use other indicators to confirm those signals. Also, since the AO is much slower than the AC, you may want to speed up the AO a little by either using a 21 "Ma period 2" instead of 34 OR by reducing the "Variance" from 2 to 1.5.


PdfMa AC-AO.png
UT_! PdfMa awesome (mtf) is giving awesome result when used on 15 min MTF on 1 min chart for 5 to 10 pips targeted trades, very much helpful to catch the trend and make trade in direction of trade

If I use 15 min MTF ( with 5, 24 MA) I need to wait till 15 min candle get closed for confirm signal, hence I tried 75 MA and 510 MA on 1 min chart to avoid waiting for 15 min candle close, due to market volatility and spikes 1 min chart is not clean as 15 min MTF chart, Sir is it possible to make 1 min chart smother like 15 min MTF chart ???
These users thanked the author srinarayani13 for the post:
mrtools

Re: PdfMa AO & AC - Trend Indicators for MT4

1808
srinarayani13 wrote: Sun Aug 10, 2025 9:44 pm UT_! PdfMa awesome (mtf) is giving awesome result when used on 15 min MTF on 1 min chart for 5 to 10 pips targeted trades, very much helpful to catch the trend and make trade in direction of trade

If I use 15 min MTF ( with 5, 24 MA) I need to wait till 15 min candle get closed for confirm signal, hence I tried 75 MA and 510 MA on 1 min chart to avoid waiting for 15 min candle close, due to market volatility and spikes 1 min chart is not clean as 15 min MTF chart, Sir is it possible to make 1 min chart smother like 15 min MTF chart ???
If you were not doing this already, just also multiply the Accelerator Signal Period 15, so 5x15=75. That would give you a perfect representation of the AC on the 15 min chart on the 1 min chart. To make it even smoother, just increase the variance from 2 to 3 or more, as you like. Test different values until you get the result you want. Let me know how this works out for you.

Below is a screenshot of the AC on the 1 min chart but showing how it would look on the 5 minute chart.

The first sub window shows the AC with MA1 : 5, MA2: 24, Accelerator signal period: 5 and Variance: 2, with Time frame to use: 15
The second sub window shows the AC with MA1 : 5x5=25, MA2: 5x24=120, Accelerator signal period: 5x5=25 and Variance: 2, with Time frame to use: current time frame.

If I increase the Variance of the AC in the second sub window it would become even smoother.

So in your case, to see the AC on the 15 min time frame from the 1 min time frame, in your second sub window, you can use, MA1 : 5x15=75, MA2: 24x15=360, Accelerator signal period: 5x15=75, Variance: 2, and Time frame to use: current time frame. And of course you can also increase the variance to make it as smooth as you want or reduce it to make it faster. You may not get it to be an exact replica in the first sub window of the AC on the 15 minute time frame maybe because of the way the interpolation is done with the "Time frame to use" set to 15 minutes.

These users thanked the author global for the post (total 2):
srinarayani13, ivanzab2

Re: PdfMa AO & AC - Trend Indicators for MT4

1809
srinarayani13 wrote: Tue Aug 05, 2025 3:46 am I am using ! SuperTrend cci (mtf) to find larger trend, when using too far values still indicator is plotting almost same chart I had used cci period 50 with Atr 5 in 1st chart and cci period 2 with ATR 1, comparatively both values are extream different but chart is very much similar

sir can you please code it like you had done for UT_! PdfMa awesome (mtf) indicator, allowing us to change parameters
The UT_! PdfMa awesome (mtf) indicator uses the PdfMA (Probability Density Function weighted Moving Average) instead of using SMA (Simple Moving Average). However, the SuperTrend cci (mtf) doesn't have any moving averages in its calculation, so as far as I am aware, the PdfMA cannot be applied to it.
These users thanked the author global for the post:
srinarayani13

Re: PdfMa AO & AC - Trend Indicators for MT4

1810
global wrote: Mon Aug 11, 2025 8:38 am If you were not doing this already, just also multiply the Accelerator Signal Period 15, so 5x15=75. That would give you a perfect representation of the AC on the 15 min chart on the 1 min chart. To make it even smoother, just increase the variance from 2 to 3 or more, as you like. Test different values until you get the result you want. Let me know how this works out for you.

Below is a screenshot of the AC on the 1 min chart but showing how it would look on the 5 minute chart.

The first sub window shows the AC with MA1 : 5, MA2: 24, Accelerator signal period: 5 and Variance: 2, with Time frame to use: 15
The second sub window shows the AC with MA1 : 5x5=25, MA2: 5x24=120, Accelerator signal period: 5x5=25 and Variance: 2, with Time frame to use: current time frame.

If I increase the Variance of the AC in the second sub window it would become even smoother.

So in your case, to see the AC on the 15 min time frame from the 1 min time frame, in your second sub window, you can use, MA1 : 5x15=75, MA2: 24x15=360, Accelerator signal period: 5x15=75, Variance: 2, and Time frame to use: current time frame. And of course you can also increase the variance to make it as smooth as you want or reduce it to make it faster. You may not get it to be an exact replica in the first sub window of the AC on the 15 minute time frame maybe because of the way the interpolation is done with the "Time frame to use" set to 15 minutes.


EURUSD.png
Thank you so much for valuable reply, I had tested by increasing Variance from 2 to 4, it helps to reduce noise. plotting is much smother.

1st window is 15 min mtf MA1 5, MA2 34, V 2

2nd window is 1 min MA1 75, MA2 510, V 2

3rd window is 1 min MA1 75, MA2 510, V 4

It can be clearly seen window 3 is very much smother and has very less noise compare to window 2.