NexusFi: Find Your Edge


Home Menu

 





TOS End of Bar Code


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,429 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?
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Are there any eval firms that allow you to sink to your …
Traders Hideout
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
 
  #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