TMO with Higher Agg_Mobius @ TSL

BenTen

BenTen

Administrative
Staff
VIP
@scalper81 The purpose of a backtesting strategy is to backtest. There is no point in adding alerts to it. You must add the alert code to your regular indicator instead.
 
N

Nick

Active member
2019 Donor
VIP


Code:
input length = 14;
input calcLength = 5;
input smoothLength = 3;
input agg = AggregationPeriod.Week;

def o = open(period = agg);
def c = close(period = agg);
def data = fold i = 0 to length
           with s
           do s + (if c > getValue(o, i)
                   then 1
                   else if c < getValue(o, i)
                        then - 1
                        else 0);
def EMA5 = ExpAverage(data, calcLength);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
     Main.AssignValueColor(if Main > Signal
                           then color.green
                           else color.Red);
     Signal.AssignValueColor(if Main > Signal
                             then color.green
                             else color.red);
     Signal.HideBubble();
     Signal.HideTitle();

plot OB = 10.5;
Plot ArrowDn = signal crosses below OB;
#Plot ArrowDn = Main crosses below Signal;

Hi @BenTen, request your assistance, i tried to modify this TMO indicator with the intention to ONLY plot an Down arrow when the Main Line crosses below the Signal line, and it must be in the Green Zone as shown in the attached pic.

I attempted and created an "OB zone" and used the conditions above to create a plot the down Arrow..but it was not close to what i would like to achieve.

Request your help or anyone can assist me.

Thank you
 
markos

markos

Well-known member
VIP
Hi @Nick I'm here for a few hours. I should have some samples for you to work with. Hopefully not too long. Markos

@Nick Below is an upper TMO with arrows (Coded by @wtf_dude) and a TMO below to compare it against. READ Notes in Studies.
Notice that the arrows come 1 bar later.
Something else, VEEV has been a leading stock. Notice how the highs & lows of the lower TMO are working towards the center as price marches up. That is a nuance that we spoke of a year ago.
I haven't come across the code yet for only showing only arrows at the cloud crossing. @BenTen I know that JQ has a study somewhere in the OneNote but I can't find it tonight. If this were to be done, @wtf_dude 's study would need to be re-tooled, I fear.
I wanted to get this to you as the sun was rising & before I go to bed.
Try this Chart w arrows: https://tos.mx/yDE3Ws8
 
Last edited:
markos

markos

Well-known member
VIP
Hi @markos, nice to hear from you again..thanks for your help.
@Nick please read above carefully, I mis-spelled a word or two. Good to hear from you as well. You might have to look through the OneNote in the Tutorials to find what you are looking for.
 
N

Nick

Active member
2019 Donor
VIP
Hi @Nick I'm here for a few hours. I should have some samples for you to work with. Hopefully not too long. Markos

@Nick Below is an upper TMO with arrows (Coded by @wtf_dude) and a TMO below to compare it against. READ Notes in Studies.
Notice that the arrows come 1 bar later.
Something else, VEEV has been a leading stock. Notice how the highs & lows of the lower TMO are working towards the center as price marches up. That is a nuance that we spoke of a year ago.
I haven't come across the code yet for only showing only arrows at the cloud crossing. @BenTen I know that JQ has a study somewhere in the OneNote but I can't find it tonight. If this were to be done, @wtf_dude 's study would need to be re-tooled, I fear.
I wanted to get this to you as the sun was rising & before I go to bed.
Try this Chart w arrows: https://tos.mx/yDE3Ws8
# TMO ((T)rue (M)omentum (O)scilator)
# Mobius
# V01.05.2018
#hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.

#declare Lower;

input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);


def ob = if isNaN(c) then double.nan else round(length * .7);

def os = if isNaN(c) then double.nan else -round(length * .7);

plot BUYsignal =Main < OS and Main crosses above Signal;
BuYsignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Buysignal.SetLineWeight(1);
Buysignal.AssignValueColor(COLOR.White);

plot SELLsignal = Main > OB and Main crosses below Signal;
Sellsignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellsignal.SetLineWeight(1);
sellsignal.AssignValueColor(COLOR.Yellow);

Hi @markos, thank you once again. Hope u manage to get some rest too. I did go through the original TMO discussion and found @DeusMecanicus shared the script to identify cross over within the OB and OS zone. I have added them and I think it works fine.

"VEEV has been a leading stock. Notice how the highs & lows of the lower TMO are working towards the center as price marches up."
I am trying to recall what was our discussion with regards to this observation. I did a similar comparison with NOW/NVDA and try to capture my observation, and my assumption is that most of the leading stocks will likely to rebound as they approaches the 0 level ?? Pls correct me if i am wrong.

Thank u
 
markos

markos

Well-known member
VIP
@Nick remember what I have said in the past, indicators only indicate. They give clues. Price is the ultimate indicator. Approaching the 0 level really has no bearing. If the market goes down hard and the stock you watch goes down also, it might get into the red zone. Recall your IBD training and use the indicator to help you.
 
N

Nick

Active member
2019 Donor
VIP
@markos Thank you for your advice. My understanding of IBD is that it focuses on momentum stocks and we shld look out for those what have high Relative strength. Is it then right that using the TMO indicator, on these momentum stocks will provide some indication of potential reversal?
 

Similar threads

Top