NexusFi: Find Your Edge


Home Menu

 





negative bars


Discussion in ThinkOrSwim

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




 
Search this Thread

negative bars

  #1 (permalink)
 shantzzz 
pittsburgh, pa
 
Experience: Intermediate
Platform: sierra, ToS
Trading: /es
Posts: 4 since Nov 2019
Thanks Given: 2
Thanks Received: 1

Hi, newbie question here.

I know that you can have thinkscript look at bars with a negative number, for example

def a = study<study[-1]

but how does this work exactly? Isn't this looking into the future?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
What broker to use for trading palladium futures
Commodities
Footprint for strategy Builder
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
57 thanks
Just another trading journal: PA, Wyckoff & Trends
16 thanks
Trading with Intuition
15 thanks
Self sabotage reframed
15 thanks
GFIs1 1 DAX trade per day journal
8 thanks
  #2 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106


shantzzz View Post
Hi, newbie question here.

I know that you can have thinkscript look at bars with a negative number, for example

def a = study<study[-1]

but how does this work exactly? Isn't this looking into the future?

When programming strategies you may want to have your entry triggered on the close of the next (future) bar. However, when backtesting, it's not really a future bar because it's already in the past. It's just the next bar after your conditions for entry have been met.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 shantzzz 
pittsburgh, pa
 
Experience: Intermediate
Platform: sierra, ToS
Trading: /es
Posts: 4 since Nov 2019
Thanks Given: 2
Thanks Received: 1


Well explained, thank you

Started this thread Reply With Quote
Thanked by:




Last Updated on November 2, 2019


© 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