NexusFi: Find Your Edge


Home Menu

 





TOS End of Bar Code


Discussion in ThinkOrSwim

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




 
Search this Thread

TOS End of Bar Code

  #1 (permalink)
Kraang
New York, New York/USA
 
Posts: 1 since Jul 2014
Thanks Given: 0
Thanks Received: 0

Hi. I have been tooling off and on with TOS for over a year and cannot figure out a couple of things. 1. how to make my strategies trigger at the end of the bar rather than the open of the next bar. 2. How to use bars to exit a position - for example, enter on X - exit one bar from X. Can anyone point me in the right direction? Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
emanon
los angeles, California, USA
 
Posts: 8 since Aug 2014
Thanks Given: 2
Thanks Received: 1

There are a few ways to get it to use the close of the current bar, the easiest way since I don't know your code would be:
 
Code
AddOrder(OrderType.buy_to_open, condition = cond1, price =close, tradeSize = contracts, arrowcolor = Color.RED, name = "b01" );
The easiest close after your condition would probably be something like:
 
Code
def CloseCond = cond1[1]; # if buy condition happened one bar ago, true.

Reply With Quote
Thanked by:




Last Updated on August 16, 2014


© 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