[SC] Overlay a study, but only at bar open - Sierra Chart Programming | futures io social day trading
futures io futures trading

[SC] Overlay a study, but only at bar open
Updated: Views / Replies:1,271 / 3
Created: by Nicolas11 Attachments:2

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

[SC] Overlay a study, but only at bar open

  #1 (permalink)
Elite Member
near Paris, France
Futures Experience: Beginner
Platform: -
Favorite Futures: -
Nicolas11's Avatar
Posts: 1,071 since Aug 2011
Thanks: 2,232 given, 1,725 received

[SC] Overlay a study, but only at bar open


As previously discussed, I have understood that you want to overlay a study on a chart, but you only want the update to be done at the open of the bar.

You could test the following:
  • Open a 1-tick chart (or any quick chart).
  • Apply study "Bar Number (modulo 10)" to this 1-tick chart. This study simply plots the Bar Number of each bar (modulo 10). So we are sure that the value of the study changes at each tick.
  • Open a 6-range chart (or any kind of chart)
  • Apply study "Overlay only at bar open" to the 6-range chart. Check in the input tab that the study to overlay is the "Bar Number (modulo 10)" of 1-tick chart.

Normally, you will see that the overlaid study just updates at each 6-range open.

How does it work?
The 6-range study is updated only when sc.Index is different from the value of sc.Index at last call (known through the use of a persistent variable).

Two drawbacks:
(i) I do not know if SC systematically calls studies at the opening of new bar. If no, there could be a very short time difference between the actual open of the bar and the first call to the study. This time difference is 500ms or any shorter value defined by the user in Global Settings > General Settings
(ii) The correspondence between 1-tick chart and 6-range chart is made with function sc.GetContainingIndexForDateTimeIndex, which is not precise to the tick (timestamp effect). EDIT: This time difference is 1s maximum.

Perhaps it does not answer 100% to your need, but it could give you ideas.


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: cpp ejtrader.cpp (2.2 KB, 9 views)

Last edited by Nicolas11; August 13th, 2012 at 09:02 AM. Reason: Addition (visible)
Reply With Quote
The following user says Thank You to Nicolas11 for this post:
  #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
Portland, OR
Futures Experience: Intermediate
Platform: Sierra Chart
Favorite Futures: ES
Posts: 269 since Jan 2011
Thanks: 326 given, 178 received

Thanks a lot Nicolas. Appreciate it. I am going to give this a try and let you know how it goes.

Reply With Quote
  #4 (permalink)
Elite Member
Portland, OR
Futures Experience: Intermediate
Platform: Sierra Chart
Favorite Futures: ES
Posts: 269 since Jan 2011
Thanks: 326 given, 178 received

Nicolas - After initial review - this seem to be the perfect solution I was looking for.

Would expand further on this framework and reply if I have any further questions on this subject.


Reply With Quote
The following user says Thank You to ejtrader for this post:


futures io > > > > > [SC] Overlay a study, but only at bar open

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

September Journal Challenge (sponsored by TopstepTrader)


Battlestations! Win $947 in prizes for showing us your trading desk!


Finding Your Edge & Maximizing Returns w/Richard L Weissman

Oct 16

Similar Threads
Thread Thread Starter Forum Replies Last Post
PAINT BAR STUDY gparkis NinjaTrader Programming 2 February 16th, 2012 07:22 PM
How to overlay bollinger and RSI on the same panel in Ninja 7? bingo17 NinjaTrader 10 October 6th, 2011 04:27 PM
Can you overlay Bonds on a ES chart in Multicharts? Birch49 MultiCharts 1 January 22nd, 2011 04:39 PM
Volitility indicator question - Open - Open / open - close / close to open andresimon NinjaTrader 2 September 27th, 2010 12:33 AM
Transparent overlay trick MXASJ NinjaTrader Programming 1 May 27th, 2010 03:48 AM

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

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2018-10-12 in 0.12 seconds with 15 queries on phoenix