bamafamily333
New member
Good Evening Everyone,
First post ever on this sight...so please go easy..
I am a transplant from Fidelity WealthLab since they "adjusted" their subscriptions....
I have been trading for about 25 years, so I am not a newbie to that portion of the game....
I have been following along the forum for about a month..
I have been trying to learn the code from all the great authors here....and I must say...I like the Thinkscript coding language....very simple....
and the GUI itself is pretty user friendly.....so..on to my question....
I am currently using the TMO_MTF (thx to Mobius and all the ones who came behind tweaking the visuals)
I also like Schaff, but am having trouble writing the code to produce a valid MTF display with all 3 indicators....(in this case 3m, 15m, 1H)
When I set the timeframe to 3m, the 3m line is fine, but the 15m and hourly are very coarse.....stair-stepped if you will...
Any help in correcting this would be greatly appreciated....thx (and I did hunt around the board, but could not find the version I am looking for or a solution inside of another code to fix the issue)
First post ever on this sight...so please go easy..
I am a transplant from Fidelity WealthLab since they "adjusted" their subscriptions....
I have been trading for about 25 years, so I am not a newbie to that portion of the game....
I have been following along the forum for about a month..
I have been trying to learn the code from all the great authors here....and I must say...I like the Thinkscript coding language....very simple....
and the GUI itself is pretty user friendly.....so..on to my question....
I am currently using the TMO_MTF (thx to Mobius and all the ones who came behind tweaking the visuals)
I also like Schaff, but am having trouble writing the code to produce a valid MTF display with all 3 indicators....(in this case 3m, 15m, 1H)
When I set the timeframe to 3m, the 3m line is fine, but the 15m and hourly are very coarse.....stair-stepped if you will...
Any help in correcting this would be greatly appreciated....thx (and I did hunt around the board, but could not find the version I am looking for or a solution inside of another code to fix the issue)
Code:
declare lower;
input fastLength = 23;
input slowLength = 50;
input KPeriod = 10;
input DPeriod = 3.0;
input over_bought = 95;
input over_sold = 5;
input averageType = AverageType.Exponential;
input agg = AggregationPeriod.THREE_MIN;
def macd = MovingAverage(averageType, close(period =agg), fastLength) - MovingAverage(averageType, close(period = agg), slowLength);
def fastK1 = FastKCustom(macd, KPeriod);
def fastD1 = MovingAverage(averageType, fastK1, DPeriod);
def fastK2 = FastKCustom(fastD1, KPeriod);
plot STC = MovingAverage(averageType, fastK2, DPeriod);
plot OverBought = over_bought;
plot OverSold = over_sold;
input agg1 = AggregationPeriod.FIFTEEN_MIN;
def macd1 = MovingAverage(averageType, close(period =agg1), fastLength) - MovingAverage(averageType, close(period = agg1), slowLength);
def fastK1_1 = FastKCustom(macd1, KPeriod);
def fastD1_1 = MovingAverage(averageType, fastK1_1, DPeriod);
def fastK2_1 = FastKCustom(fastD1_1, KPeriod);
plot STC_1 = MovingAverage(averageType, fastK2_1, DPeriod);
input agg2 = AggregationPeriod.HOUR;
def macd2 = MovingAverage(averageType, close(period =agg2), fastLength) - MovingAverage(averageType, close(period =agg2), slowLength);
def fastK1_2 = FastKCustom(macd2, KPeriod);
def fastD1_2 = MovingAverage(averageType, fastK1_2, DPeriod);
def fastK2_2 = FastKCustom(fastD1_2, KPeriod);
plot STC_2 = MovingAverage(averageType, fastK2_2, DPeriod);
STC.SetDefaultColor(GetColor(9));
STC_1.SetDefaultColor(GetColor(1));
STC_2.SetDefaultColor(GetColor(4));
OverBought.SetDefaultColor(GetColor(2));
OverSold.SetDefaultColor(GetColor(6));
Last edited by a moderator: