TOS End of Bar Code - ThinkOrSwim | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim

TOS End of Bar Code
Started:July 5th, 2014 (06:42 AM) by Kraang Views / Replies:453 / 1
Last Reply:August 16th, 2014 (01:44 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

TOS End of Bar Code

Old July 5th, 2014, 06:42 AM   #1 (permalink)
Trading Apprentice
New York, New York/USA
Futures Experience: Intermediate
Platform: Tradestation, ThinkorSwim, Strategy Desk
Favorite Futures: Futures
Posts: 1 since Jul 2014
Thanks: 0 given, 0 received

TOS End of Bar Code

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

Old August 16th, 2014, 01:44 AM   #2 (permalink)
Trading Apprentice
los angeles, California, USA
Futures Experience: Intermediate
Platform: AMIBroker
Favorite Futures: stocks
Posts: 8 since Aug 2014
Thanks: 2 given, 0 received

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:
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:
def CloseCond = cond1[1]; # if buy condition happened one bar ago, true.

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim > TOS End of Bar Code

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
TOS bar count labels MAXX ThinkOrSwim 7 October 16th, 2015 09:08 PM
Moving Average With Colors TOS Code Marty3 ThinkOrSwim 3 May 5th, 2015 11:21 AM
Code TOS Vervoort Crossover for Sierra platform trendfriendpa Sierra Chart 6 April 11th, 2013 10:07 AM
Can anyone convert a code from TOS j8fire ThinkOrSwim 8 July 18th, 2012 08:24 PM
End of bar strategies with advanced bar types (Renko, Range, Kagi, etc) RM99 Elite EasyLanguage Automated Trading 2 September 9th, 2011 08:38 AM

All times are GMT -4. The time now is 10:08 AM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-24 in 0.08 seconds with 23 queries on phoenix via your IP