New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: SweetAndSour
About
User Name: SweetAndSour
Groups: Gold User, Member
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Friday, May 26, 2017
Last Visit: Thursday, April 19, 2018 11:13:59 PM
Number of Posts: 22
[0.01% of all post / 0.06 posts per day]
Avatar
Last 10 Posts
Topic: Measuring Trend Strength
Posted: Wednesday, April 18, 2018 2:06:23 PM

Hi Trainer,

I would like to measure the trend strength by number of candles.

The idea is that I have an ema50 and an ema100. The measurement starts on that day that the ema50 crosses above the ema100 and ends on the day that the ema50 crosses under the ema100. A good example is CBOE in 2017. Best would be to have a result between 0 and 100 so it can also be used as an oscillator.

Thanks for your help...

Topic: Stochastic Momentum Index - SMI
Posted: Monday, March 05, 2018 10:34:59 PM

Ok Thanks Trainer. I'll sort it out.

Topic: Stochastic Momentum Index - SMI
Posted: Monday, March 05, 2018 2:13:58 AM

Hi Trainer,

In Tradingview, i'm using a short-term indicator called "Stochastic Momentum Index" or SMI.

I would like to use the same formula/index in TC2000. Is there a way you can translate the code below into PCF?

a = input(5, "Percent K Length")
b = input(3, "Percent D Length")
 
ll = lowest (low, a)
hh = highest (high, a)
diff = hh - ll
rdiff = close - (hh+ll) / 2
 
avgrel = ema(ema(rdiff,b),b)
avgdiff = ema(ema(diff,b),b)
 
SMI = avgdiff != 0 ? (avgrel/(avgdiff/2)*100) : 0
SMIsignal = ema(SMI,b)
 
plot(SMI, title = "Stochastic Momentum Index")
plot(SMIsignal, color= red, title = "SMI Signal Line")
 
plot(40, color = red, title = "Over Bought")
plot(-40, color = green, title = "Over Sold")
plot(0, color = blue, title = "Zero Line")
 
Thanks
Topic: Historical Volatility over 3 years in a monthly Timeframe
Posted: Wednesday, December 13, 2017 2:43:27 PM

Thanks!

Topic: Historical Volatility over 3 years in a monthly Timeframe
Posted: Wednesday, December 13, 2017 4:45:05 AM

Hi Trainer,

I'm trying to get the Historical Volatility over 3 years in a monthly Timeframe, but not sure whether the following formula ist correct. The Output should be a simple decimal value:

SQR(ABS((SUM(LOG(C / C1) ^ 2,36) - LOG(C / C36) ^ 2/36) / 36))

Thanks!!

 

Topic: Conditional ATR Trailing Stop based on a multiplier
Posted: Tuesday, November 28, 2017 12:37:15 PM

QUOTE (Bruce_L)

I really don't have a way of converting that into a formula. Have you looked at the Volatility Stop indicator with the Period set to 5 and the True Range Multiplier set to 3.5?

I'll give it a try and do some backtesting.

Whats the Formula to check when the Volatility Switch changes from down trend to up trend?

Thanks

Topic: Conditional ATR Trailing Stop based on a multiplier
Posted: Tuesday, November 28, 2017 10:53:10 AM

Hi Teacher

May i ask you to translate the following code snippet (the conditional part only) into a conditional PCF Formula? Value[n] ist the current value of the TrailingStop Line...

 
if (Close[0] > Value[1] && Close[1] > Value[1])
    trail = Math.Max(Value[1], Close[0] - (ATR(5)[0] * 3.5));
else if (Close[0] < Value[1] && Close[1] < Value[1])
    trail = Math.Min(Value[1], Close[0] + (ATR(5)[0] * 3.5));
else if (Close[0] > Value[1])
    trail = Close[0] - (ATR(5)[0] * 3.5);
else
    trail = Close[0] + (ATR(5)[0] * 3.5);
 
AddPlot(new Stroke(Brushes.Orange, 2), PlotStyle.Line, "TrailingStop");
TrailingStop[0] = (trail);

Thanks for your help...

Topic: Ehlers Early Trend Detection - The Quotient Transform Indicator
Posted: Tuesday, November 28, 2017 10:36:10 AM

QUOTE (Bruce_L)

I cannot think of a practical method of creating this using Custom PCF Indicators in TC2000.

 

Ok thanks anyway ;-)

Topic: Ehlers Early Trend Detection - The Quotient Transform Indicator
Posted: Monday, November 27, 2017 3:58:32 AM

I wonder wheter it is possible to built a pretty complicated Ehlers indicator in TC2000? Last week i posted a newly developed Ehlers early trend detection indicator on futures.io,  which was presented in the August 2014 issue of the TASC magazine.

Look at the picture so you can see the indicator in action: https://futures.io/local_links.php?action=ratelink&catid=27&linkid=1936

Here&#39;s the complete formula developed in Microsoft C-Sharp fpr Ninjatrader. Note that Input[0] is the current bar while Input[1] is one bar a go and so on...

private double alpha1;
private double a1;
private double b1;
private double c1;
private double c2;
private double c3;
private double x;
private double quotientFastLong;
private double quotientSlowLong;
private double quotientFastShort;
private double quotientSlowShort;
private double kFastLong = 0.40;
private double kSlowLong = 0.90;
private double kFastShort = -0.40;
private double kSlowShort = -0.90;
private Series<double> HP;
private Series<double> Filt;
private Series<double> Peak;
 
AddPlot(new Stroke(Brushes.LightGreen, 1), PlotStyle.Line, "QTFastLong");
AddPlot(new Stroke(Brushes.Green, 1), PlotStyle.Line, "QTSlowLong");
AddPlot(new Stroke(Brushes.IndianRed, 1), PlotStyle.Line, "QTFastShort");
AddPlot(new Stroke(Brushes.Red, 1), PlotStyle.Line, "QTSlowShort");
AddLine(Brushes.Yellow, 0.0, "Zero");
 
LPPeriod = 20;
 
alpha1 = ((Math.Cos(((.707 * 360 / 100) * Math.PI) / 180)) + (Math.Sin(((.707 * 360 / 100) * Math.PI) / 180)) - 1) / (Math.Cos(((.707 * 360 / 100) * Math.PI) / 180));
a1 = Math.Exp(-1.414 * 3.14159 / LPPeriod);
b1 = 2 * a1 * (Math.Cos(((1.414 * 180 / LPPeriod) * Math.PI) / 180));
c2 = b1;
c3 = (a1 * -1) * a1;
c1 = 1 - c2 - c3;
 
HP[0] = ((1 - alpha1 / 2) * (1 - alpha1 / 2) * (Input[0] - 2 * Input[1] + Input[2]) + 2 * (1 - alpha1) * HP[1] - (1 - alpha1) * (1 - alpha1) * HP[2]);
Filt[0] = (c1 * (HP[0] + HP[1]) / 2 + c2 * Filt[1] + c3 * Filt[2]);
Peak[0] = (Peak[1] * 0.991);
 
if (Math.Abs(Filt[0]) > Peak[0])
    Peak[0] = (Math.Abs(Filt[0]));
 
if (Peak[0] < 0.0 || Peak[0] > 0.0)
    x = (Filt[0] / Peak[0]);
 
quotientFastLong = (x + KFastLong) / (KFastLong * x + 1);
quotientSlowLong = (x + KSlowLong) / (KSlowLong * x + 1);
quotientFastShort = (x + KFastShort) / (KFastShort * x + 1);
quotientSlowShort = (x + KSlowShort) / (KSlowShort * x + 1);
 
QTFastLong[0] = (quotientFastLong);
QTSlowLong[0] = (quotientSlowLong);
QTFastShort[0] = (quotientFastShort);
QTSlowShort[0] = (quotientSlowShort);
Topic: HMA Bull Signal used in Ninjatrader
Posted: Thursday, November 16, 2017 1:40:49 PM

Thanks. I&#39;ll try it out.

Krgds