mtf column indicator if close - open = 3

alexo2022

New member
i have another question,

I want a column indicator that will check for example if close - open = 3 in different time frame,
Yearly, Quarterly, Monthly, Weekly, Daily, and will return all the time frames that the result was 3.

for example, if the yearly, quarterly, monthly, weekly and daily had 3, then return - "Y","Q" , "M", "W", "D"
if only the daily had weekly, then return "D", "W" etc.
if no time frame has this result - return 0

the result can be between 0 to 5 letters, according to the different timeframes result.
 
Last edited by a moderator:
Solution
i have another question,

I want a column indicator that will check for example if close - open = 3 in different time frame,
Yearly, Quarterly, Monthly, Weekly, Daily, and will return all the time frames that the result was 3.

for example, if the yearly, quarterly, monthly, weekly and daily had 3, then return - "Y","Q" , "M", "W", "D"
if only the daily had weekly, then return "D", "W" etc.
if no time frame has this result - return 0

the result can be between 0 to 5 letters, according to the different timeframes result.

this is a column study that will compare 4 MTF price differences to a set dollar amount, and display Y M W D, if each difference is less than the number. the default price is 3.00.
it counts how many of the 4...
i have another question,

I want a column indicator that will check for example if close - open = 3 in different time frame,
Yearly, Quarterly, Monthly, Weekly, Daily, and will return all the time frames that the result was 3.

for example, if the yearly, quarterly, monthly, weekly and daily had 3, then return - "Y","Q" , "M", "W", "D"
if only the daily had weekly, then return "D", "W" etc.
if no time frame has this result - return 0

the result can be between 0 to 5 letters, according to the different timeframes result.
Watchlists can only access data on one aggregation.
The ToS platform does not provide for the analysis of multiple timeframes in watchlist scripts or scanners, or conditional orders, etc...
Multiple timeframe use is limited to scripts in Charts.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

i have another question,

I want a column indicator that will check for example if close - open = 3 in different time frame,
Yearly, Quarterly, Monthly, Weekly, Daily, and will return all the time frames that the result was 3.

for example, if the yearly, quarterly, monthly, weekly and daily had 3, then return - "Y","Q" , "M", "W", "D"
if only the daily had weekly, then return "D", "W" etc.
if no time frame has this result - return 0

the result can be between 0 to 5 letters, according to the different timeframes result.

I tried to do the following example code on a Daily Chart and a Daily market watch column. The Daily Chart worked, but not the market watch It only returned "D" if true, but not the others that the Daily Chart did. You likely would have to have a separate market watch column for each timeframe.

Screenshot-2022-11-10-123640.png
Ruby:
def condD = close(period = AggregationPeriod.DAY) - open(period = AggregationPeriod.DAY) >= 0;
def condW = close(period = AggregationPeriod.WEEK) - open(period = AggregationPeriod.WEEK) >= 0;
def condM = close(period = AggregationPeriod.MONTH) - open(period = AggregationPeriod.MONTH) >= 0;
def condQ = close(period = AggregationPeriod.QUARTER) - open(period = AggregationPeriod.QUARTER) >= 0;
def condY = close(period = AggregationPeriod.YEAR) - open(period = AggregationPeriod.YEAR) >= 0;
AddLabel(1,
(if condY then "Y" else "") +
(if condQ then "Q" else "") + 
(if condW then "W" else "") +
(if condD then "D" else "")
 ,  Color.WHITE);
 
Last edited:
i have another question,

I want a column indicator that will check for example if close - open = 3 in different time frame,
Yearly, Quarterly, Monthly, Weekly, Daily, and will return all the time frames that the result was 3.

for example, if the yearly, quarterly, monthly, weekly and daily had 3, then return - "Y","Q" , "M", "W", "D"
if only the daily had weekly, then return "D", "W" etc.
if no time frame has this result - return 0

the result can be between 0 to 5 letters, according to the different timeframes result.

this is a column study that will compare 4 MTF price differences to a set dollar amount, and display Y M W D, if each difference is less than the number. the default price is 3.00.
it counts how many of the 4 signals are true, and includes that number first, for sorting the column.

the price differences are , the absolute difference of
current close - (MTF open) , for the current: year, month, week, day.
https://usethinkscript.com/threads/column-mtf-price-comparisons-y-m-w-d.13329/
 
Solution
Thread starter Similar threads Forum Replies Date
B MTF Stochastic Questions 1
E MTF Stacked Moving Averages Questions 3
M MTF AMA Questions 2
C MTF EMA cloud Questions 1
V MTF Marubozu signals Questions 0

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
320 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top