NexusFi: Find Your Edge


Home Menu

 





Thinkscript Strategy using Higher Time Frames


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,672 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
 apmodeler 
Boise, Idaho
 
Experience: Intermediate
Platform: TOS
Trading: Stocks
Posts: 37 since Aug 2013
Thanks Given: 56
Thanks Received: 9

Hi All,
I'm working on a strategy that uses multiple time periods (AggregationPeriod). When referring to the higher timeframe function in a buy or sell condition is it better to use the current price or the previous price bar? For example if the higher time frame is Month and a close condition needs to be included , then it would be CLOSE(period = AggregationPeriod.Month). However, CLOSE(period = AggregationPeriod.Month) would not be a completed bar till the month actually ends. So there seems to be a chance a repaint may happen while trading during the month.

This could be resolved by using the prior bar CLOSE(period = AggregationPeriod.Month)[1]. However, it seems that the results are better when using the current HTF bar and not the prior HTF bar.

Was wondering if others have experience working through this?
Thank you in advance for any feedback.
Regards,
AP


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trump Media to sell instant access to market-moving soci …
Traders Hideout
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
EA
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #2 (permalink)
 
casey44's Avatar
 casey44 
Louisville KY
 
Experience: Beginner
Platform: NT8
Trading: micros
Frequency: Daily
Duration: Minutes
Posts: 276 since Jan 2010
Thanks Given: 4,146
Thanks Received: 329


apmodeler View Post
Hi All,
I'm working on a strategy that uses multiple time periods (AggregationPeriod). When referring to the higher timeframe function in a buy or sell condition is it better to use the current price or the previous price bar? For example if the higher time frame is Month and a close condition needs to be included , then it would be CLOSE(period = AggregationPeriod.Month). However, CLOSE(period = AggregationPeriod.Month) would not be a completed bar till the month actually ends. So there seems to be a chance a repaint may happen while trading during the month.

This could be resolved by using the prior bar CLOSE(period = AggregationPeriod.Month)[1]. However, it seems that the results are better when using the current HTF bar and not the prior HTF bar.

Was wondering if others have experience working through this?
Thank you in advance for any feedback.
Regards,
AP

Not sure I fully understand but well enough that I think the following could be a resource....
This site: https://usethinkscript.com/
Search for user “Pelonsax” and/or title: “Rob Smith's The Strat Indicator...”
And if of value hope you'll return and post result(s).


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 apmodeler 
Boise, Idaho
 
Experience: Intermediate
Platform: TOS
Trading: Stocks
Posts: 37 since Aug 2013
Thanks Given: 56
Thanks Received: 9


Hi casey44,
Thank you for the link.
I will take a look and post any conclusion I may have.

My apologies for not being clearer. Just to clarify again....Two monthly charts are posted below, the first one on March 8th and the second one on March 31st of the same instrument. you can see that the candle in the red box is a bear bar in the first chart and it is a bull bar in the second chart.

If I am creating a simple strategy that references the monthly chart with the condition Close>open ( which in this case it would be CLOSE(period = AggregationPeriod.Month) > Open(period = AggregationPeriod.Month)), the bar in the red box changes from one type to another depending on the day of the month, the report generated may not be accurate. Or does the thinkorswim platform calculate it accurately?

Hope this makes a bit more sense.


MonthlyChart1


MonthlyChart2


Started this thread Reply With Quote




Last Updated on November 28, 2021


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts