reference last bar (of week) - NinjaTrader Programming | futures io social day trading
futures io futures trading

reference last bar (of week)
Updated: Views / Replies:615 / 2
Created: by yeshe Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

reference last bar (of week)

  #1 (permalink)
Elite Member
San Fransisco Ca
Trading Experience: Intermediate
Platform: Ninjatrader
Broker/Data: IB
Favorite Futures: forex
Posts: 17 since Jan 2014
Thanks: 5 given, 1 received

reference last bar (of week)

Hello dear forum,

Can you help me with the following?

I want to have an indicator that refers to the last bar of the week (in historical data) for all open charts.

so for a minute chart it is the last minute bar of the week
for 1 hour chart is the last hour of the week
1 day chart it is friday

how to program this in ninjatrader
for example

if (Last bar of the week = true)

many tx in advance


Last edited by yeshe; October 13th, 2014 at 04:46 AM. Reason: typing mistake
Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

  #3 (permalink)
Elite Member
Heidelberg, Germany
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Stocks
Posts: 11 since Jun 2014
Thanks: 7 given, 12 received

The question is always whether the last bar of the week was also the last trading day in that week. Theoretically, if you account for public holidays, etc, you would need to know in advance when the market closes.

The simple approach is on the next bar into the new week to notice that you are in a new week (which for your requirement) will work. Something like this:

int dayOfWeek = 0;

void OnBarUpdate()
    if (Time[0].DayOfWeek < dayOfWeek)
        // it seems that week has started new again, do your calculations for last week
    dayOfWeek = Time[0].DayOfWeek;

Reply With Quote


futures io > > > > > reference last bar (of week)

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Day Trading Oil Futures: Reducing Risk & Increasing Profits w/DTN IQFeed

Mar 26

Similar Threads
Thread Thread Starter Forum Replies Last Post
thinkscript reference situhold ThinkOrSwim 3 September 12th, 2014 12:58 PM
tried to reference too many bars back malibu TradeStation 4 June 2nd, 2014 03:33 PM
External reference Sterlingtrader MultiCharts 1 May 2nd, 2014 04:50 AM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 04:49 PM
plot axis reference for bar style SARdynamite NinjaTrader Programming 1 July 17th, 2010 06:02 AM

1 hour chart, code, data, dayofweek, historical data, indicator, indicators, information, ninja, ninjascript, ninjatrader, trading

All times are GMT -4. The time now is 05:55 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business,
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 2019-03-21 in 0.18 seconds with 14 queries on phoenix