NexusFi: Find Your Edge


Home Menu

 





Thinkscript Strategy using Higher Time Frames


Discussion in ThinkOrSwim

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




 
Search this Thread

Thinkscript Strategy using Higher Time Frames

  #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?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
65 thanks
Funded Trader platforms
42 thanks
Battlestations: Show us your trading desks!
25 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
The Program
19 thanks
  #2 (permalink)
 
casey44's Avatar
 casey44 
Louisville KY
 
Experience: Beginner
Platform: NT8
Trading: micros
Frequency: Daily
Duration: Minutes
Posts: 247 since Jan 2010
Thanks Given: 4,039
Thanks Received: 311


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts