T3 - page 40

 
mladen:
This would be the version done based on guessing game

Example is with counts set to 1,2,3,4 and 5. Periods and "hot" fields are same for all the instances

PS: that is with count set to 3, exactly the same as original Tim Tillson T3. Fulks/Matulich calculation is not covered with this version

Thank you very much Mladen! I will give it a try.

 

It is working. Thank you very much Mladen. And since it takes the median price of the moving average 1 period it was easy for me to change it to the MA I need.

Thank you. Much appreciated.

 
mladen:
Do you happen to have the source of the NinjaTrader version of T3? I do not use NinjaTrader that is why I am asking

Good afternoon mladen:

He had not seen your application before.

If it helps here still has a good code for Ninja Trader T3.

//

{

#region Variables

private double vFactor = 0.7; // Default setting for VFactor

private int tCount = 3;

private int period = 14;

private bool candles = true;

private bool paintBars = false;

private Color upColor = Color.DeepSkyBlue;

private Color downColor = Color.OrangeRed;

private int plot0Width = 2;

private PlotStyle plot0Style = PlotStyle.Line;

private DashStyle dash0Style = DashStyle.Solid;

private System.Collections.ArrayList seriesCollection;

#endregion

///

/// This method is used to configure the indicator and is called once before any bar data is loaded.

///

protected override void Initialize()

{

Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "T3Colored"));

Overlay = true;

PlotsConfigurable = false;

}

///

///

protected override void OnStartUp()

{

candles = false;

if (ChartControl != null && ChartControl.ChartStyleType == ChartStyleType.CandleStick)

candles = true;

Plots[0].Pen.Width = plot0Width;

Plots[0].PlotStyle = plot0Style;

Plots[0].Pen.DashStyle = dash0Style;

}

///

/// Called on each bar update event (incoming tick)

///

protected override void OnBarUpdate()

{

if (TCount == 1)

{

CalculateGD(Inputs[0], Values[0]);

return;

}

if (seriesCollection == null)

{

seriesCollection = new System.Collections.ArrayList();

for (int i = 0; i < TCount - 1; i++)

seriesCollection.Add(new DataSeries(this));

}

CalculateGD(Inputs[0], (DataSeries) seriesCollection[0]);

for (int i = 0; i <= seriesCollection.Count - 2; i++)

CalculateGD((DataSeries) seriesCollection, (DataSeries) seriesCollection);

CalculateGD((DataSeries) seriesCollection[seriesCollection.Count - 1], Values[0]);

if (Rising(Values[0]))

PlotColors[0][0] = upColor;

else

PlotColors[0][0] = downColor;

if(PaintBars)

{

if (Rising(Values[0]))

{

CandleOutlineColor = upColor;

BarColor = upColor;

}

else

{

CandleOutlineColor = downColor;

BarColor = downColor;

}

if(Open[0] < Close[0] && candles)

BarColor = Color.Transparent;

}

}

private void CalculateGD(IDataSeries input, DataSeries output)

{

output.Set((EMA(input, Period)[0] * (1 + VFactor)) - (EMA(EMA(input, Period), Period)[0] * VFactor));

}

#region Properties

[Description("Numbers of bars used for calculations")]

[GridCategory("Parameters")]

public int Period

{

get { return period; }

set { period = Math.Max(1, value); }

}

[Description("The smooth count")]

[GridCategory("Parameters")]

public int TCount

{

get { return tCount; }

set { tCount = Math.Max(1, value); }

}

[Description("VFactor")]

[GridCategory("Parameters")]

public double VFactor

{

get { return vFactor; }

set { vFactor = Math.Max(0, value); }

}

[Description("Color the bars in the direction of the trend?")]

[Category("Parameters")]

[Gui.Design.DisplayName ("Paint Bars")]

public bool PaintBars

{

get { return paintBars; }

set { paintBars = value; }

}

///

///

[XmlIgnore()]

[Description("Select color for rising T3")]

[Category("Plots")]

[Gui.Design.DisplayName("T3 Rising")]

public Color UpColor

{

get { return upColor; }

set { upColor = value; }

}

// Serialize Color object

public string UpColorSerialize

{

get { return NinjaTrader.Gui.Design.SerializableColor.ToString(upColor); }

set { upColor = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }

}

///

///

[XmlIgnore()]

[Description("Select color for falling T3")]

[Category("Plots")]

[Gui.Design.DisplayName("T3 Falling")]

public Color DownColor

{

get { return downColor; }

set { downColor = value; }

}

// Serialize Color object

public string DownColorSerialize

{

get { return NinjaTrader.Gui.Design.SerializableColor.ToString(downColor); }

set { downColor = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }

}

///

///

[Description("Width for T3 Line.")]

[Category("Plots")]

[Gui.Design.DisplayNameAttribute("Line Width")]

public int Plot0Width

{

get { return plot0Width; }

set { plot0Width = Math.Max(1, value); }

}

///

///

[Description("DashStyle for T3 Line")]

[Category("Plots")]

[Gui.Design.DisplayNameAttribute("Plot Style")]

public PlotStyle Plot0Style

{

get { return plot0Style; }

set { plot0Style = value; }

}

///

///

[Description("DashStyle for T3 Line")]

[Category("Plots")]

[Gui.Design.DisplayNameAttribute("Dash Style")]

public DashStyle Dash0Style

{

get { return dash0Style; }

set { dash0Style = value; }

}

#endregion

}

}

The Tillson T3 is NinjaTrader system indicator and does not repaint.

The version attached just changes its color depending on the slope of the indicator.

Quick and dirty. Paintbars added.

A greeting.

Hermo

Attached code for NinjaTrader

 
Hermo:
Good afternoon mladen:

He had not seen your application before.

If it helps here still has a good code for Ninja Trader T3.

Thank you Hermo,

Mladen adaptation worked excellent.

 

There is one little thing though

Ninja allows 2 additional settings:

Calculate on bar close (When true, indicator values are calculated at the close of a bar, else on each incoming tick).

Displacement (Displace the indicators by n bars. E.g. displacement = 1 means, that the indicator valu of the previous bar is plotted)

So for example when you set Calculate of bar close True and Displacement 1 you will have the value of the previous bar drawn and plotted in the current bar 0.

 
bennetmeadows:
There is one little thing though

Ninja allows 2 additional settings:

Calculate on bar close (When true, indicator values are calculated at the close of a bar, else on each incoming tick).

Displacement (Displace the indicators by n bars. E.g. displacement = 1 means, that the indicator valu of the previous bar is plotted)

So for example when you set Calculate of bar close True and Displacement 1 you will have the value of the previous bar drawn and plotted in the current bar 0.

bennetmeadows

Here you go :

Two parameters added : price shift (1 would mean to use the price from the first closed bar and so on) and T3 shift (to move the whole value left or right the way you wish

t3_nt_2.mq4
Files:
t3_nt_2.mq4  5 kb
 
mladen:
bennetmeadows

Here you go :

Two parameters added : price shift (1 would mean to use the price from the first closed bar and so on) and T3 shift (to move the whole value left or right the way you wish

t3_nt_2.mq4

Thank you!

Ever since I started this journey 3 years ago and came accross TSD I have seen how much you have helped people since always. I really appreciate your willingness to help others. Everytime you do these things you have no idea how you help someone. So thank you Mladen!

 

mladen or mrtools

Can you add an extra- " t3 original" function to this indicator ?

Thank you in advance.

Files:
uni_cross.mq4  5 kb
 

mladen or mrtools

This post seems -has been missed... T3 basic mtf 2.01 https://www.mql5.com/en/forum/172884

gincius:
Dear Mladen

Can You add an interpolate function to this indicator please?

poste 369

Thans in advance
 
gincius:
mladen or mrtools

Can you add an extra- " t3 original" function to this indicator ?

Thank you in advance.

gincius

Here you go. Try it out : uni_cross_2.mq4

PS: for the ones not familiar with the indicator - it needs snake indicator to work, and since snake is a centered TMA it recalculates (repaints)

Files:
Reason: