NexusFi: Find Your Edge


Home Menu

 





negative bars


Discussion in ThinkOrSwim

Updated
    1. trending_up 745 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?
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
 
  #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