Triangular moving average (TMA) ... - page 3

 

...

voltagetoe

Please read the post about centered triangular moving average (this post : https://www.mql5.com/en/forum/181241 ) and what does it do and how does it do. That is a "centered" TMA as a basis of the indicator

voltagetoe:
Thank you very much Mladen, I took a look at it in visual backtesting and it gave very good trend following entries when the market was clearly trending. Had to narrow bands a bit though. It's the best bands indicator that I have seen. I'll be watching it more aside real trading.
 
mladen:
voltagetoe Please read the post about centered triangular moving average (this post : https://www.mql5.com/en/forum/181241 ) and what does it do and how does it do. That is a "centered" TMA as a basis of the indicator

Yeah man Mladen - no problemo. I'm aware of the shift.

 

...

Been thinking what to do about you Try this version. It works differently (see the comparison - lower is this one) but as far as I tested it, it will work on any symbol. It does the job differently, so you do not need to adapt levels when you change time frames (levels are calculated differently - a kind of a dynamic levels)

regards

secretcode:
This TmaSlope2 indicator works well with any forex pairs but doesn't work with Index and Commodity futures !!!

Can any master coder please fix this problem or explain why does it happen ?

Thanks in advance

secretcode
Files:
 
mladen:
Been thinking what to do about you

Try this version. It works differently (see the comparison - lower is this one) but as far as I tested it, it will work on any symbol. It does the job differently, so you do not need to adapt levels when you change time frames (levels are calculated differently - a kind of a dynamic levels)

regards

Thank You Mladen

secretcode

 

Cycle TMA_Centered EndPoint

Hi all,

I modified Macd indicator to Cycle Triangular moving average centered End-point .

-Slow_halflength = 2 x fast_halflength.

Hoping that this indicator can help someone !!!

Regards.

cycle_tma_end_point.mq4

 
sohocool:
Hi all,

I modified Macd indicator to Cycle Triangular moving average centered End-point .

-Slow_halflength = 2 x fast_halflength.

Hoping that this indicator can help someone !!!

Regards.

cycle_tma_end_point.mq4

Hi sohoCOOL

Its really COOL

Thanks for sharing your work

secretcode

 

Some questions to the Master

Hi, Mladen!

Got some questions trying to use "TriangularMA centered bands_mtf+alerts" in an EA. Whenever I try to read the TMA value on the last bar, it shows a completely different value than it is painted by the indie on the graph. I'm trying to use M15 TMA on a M5 TF.

Please, will You be so kind to tell me how should I read the values of the indie, so I have that value in my EA and on the graph the same?

PS. Even tried to pass the value of buffer1[1] through a GV, but still no luck.

Thanks in advance.

 

...

Most probably you are forgetting the first parameter (I see that you removed the indicator you are using, but in that one you have one extra parameter as the first parameter)

Here us how the call should look like (a very simple test EA that withdraws correct values of centered TMA line - use the TMACentered indicator from post #3 for testing, abd set the half length values to same values)

iMAG:
Hi, Mladen!

Got some questions trying to use TMA in an EA. Whenever I try to read the TMA value on the last bar, it shows a completely different value than it is painted by the indie on the graph. Ah, of course, this TMA isn't any of the versions described here in the thread, it is a MTF version with smoothing on the current TF. Unfortunatelly, I didn't find a discussion on building MTF indicators yet that would cover the question "damn, how this!?".

Please, will You be so kind to have a look over and tell me how should I read the values of the indie, so I have that value in my EA and on the graph the same? Attached is the version I'm interested in, the Ist parameter would be 15 for the M5 TF.

PS. Even tried to pass the value of buffer1[1] through a GV, but still no luck.

Thanks in advance.
Files:
 
mladen:
Most probably you are forgetting the first parameter Here us how the call should look like (a very simple test EA that withdraws correct values of central cenetered TMA line)

Thanks man, U're the best!

So, I shall use smth like this:

tma1 = iCustom(Symbol(), PERIOD_M15, "TMA", "", HalfLength, Price, ATRMultiplier, ATRPeriod, Interpolate, 0, 0, 0, 0, 0, 0, 0, 1);

(0=false for Alerts)

???

HOW THIS??? I used Symbol() instead NULL for symbol - is that the reason why it went wrong?

 

...

"I used Symbol() instead NULL for symbol - is that the reason why it went wrong?"

No. In the version of centered TMA you are using (the one you removed) the first parameter is TimeFrame. If you did not specify the "" after the "TMA" in a parameters of iCustom() call, it was not working as it should. You can leave out all the values for alerts in the iCustom() and then use it like this (after all you do not expect it to alert from the EA):

iCustom(Symbol(), PERIOD_M15, "TMA", "", HalfLength, Price, ATRMultiplier, ATRPeriod, Interpolate, 0, 1)
iMAG:
Thanks man, U're the best!

So, I shall use smth like this:

tma1 = iCustom(Symbol(), PERIOD_M15, "TMA", "", HalfLength, Price, ATRMultiplier, ATRPeriod, Interpolate, 0, 0, 0, 0, 0, 0, 0, 1);

(0=false for Alerts)

???

HOW THIS??? I used Symbol() instead NULL for symbol - is that the reason why it went wrong?
Reason: