Bar by Bar degap - Sierra Chart | futures io social day trading
futures io futures trading

Bar by Bar degap
Updated: Views / Replies:621 / 2
Created: by xioxxio 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 90,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

Bar by Bar degap

  #1 (permalink)
Trading Apprentice
New York United States
Futures Experience: Advanced
Platform: TradeNavigator, Sierra Charts
Broker/Data: IB
Favorite Futures: ES
Posts: 9 since Apr 2011
Thanks: 0 given, 0 received

Bar by Bar degap

Hey guys I am looking for the study that de-gaps every 5 minute bar. ie the close of previous bar is equal to open on current bar. Does anyone have it?

There is a study out there called shifted where it only shifts the previous days close to match current days open. Not all bars on the chart.

The shifted study is below


#include "sierrachart.h" 



SCDLLName("Shifted Study DLL")  



SCSFExport scsf_ShiftedStudy(SCStudyGraphRef sc) 


  // Set configuration variables 


  if (sc.SetDefaults) 


    // Set the defaults 


    sc.GraphName = "Shifted BaseGraph"; 


    sc.StudyDescription = "The Open value of the next day is set to the Close value of the previous day for all the days, starting with 2nd."; 


    sc.IsCustomChart = 1; 

    sc.GraphRegion = 0;    

    sc.DrawZeros = 0; 

    sc.GraphDrawType = GDT_OHLCBAR; 

    sc.StandardChartHeader = 1; 

    sc.DisplayAsMainPriceGraph = 1; 


    // Subgraphs 

    sc.Subgraph[0].Name = "Open"; 

    sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[1].Name = "High"; 

    sc.Subgraph[1].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[2].Name = "Low"; 

    sc.Subgraph[2].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[3].Name = "Last"; 

    sc.Subgraph[3].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[4].Name = "Open Base"; 

    sc.Subgraph[4].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[5].Name = "High Base"; 

    sc.Subgraph[5].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[6].Name = "Low Base"; 

    sc.Subgraph[6].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[7].Name = "Last Base"; 

    sc.Subgraph[7].DrawStyle = DRAWSTYLE_LINE; 


    sc.Subgraph[4].Name = "Volume"; 

    sc.Subgraph[4].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[5].Name = "# of Trades / OI"; 

    sc.Subgraph[5].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[6].Name = "OHLC Avg"; 

    sc.Subgraph[6].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[7].Name = "HLC Avg"; 

    sc.Subgraph[7].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[8].Name = "HL Avg"; 

    sc.Subgraph[8].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[9].Name = "Bid Vol"; 

    sc.Subgraph[9].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.Subgraph[10].Name = "Ask Vol"; 

    sc.Subgraph[10].DrawStyle = DRAWSTYLE_IGNORE; 


    sc.PersistVars->i1 = -1; 


    sc.AutoLoop = 1; 





  SCFloatArrayRef ShiftArray = sc.Subgraph[0].Arrays[0]; 


  if (sc.Index == 0) 



    sc.PersistVars->i1 = -1; 



  int Index = sc.Index; 


  if (sc.OutArraySize - 1 < Index) 

    sc.AddElements(Index - sc.OutArraySize + 1); 


  //this tick is last day, so just copy everything 

  for (int SubGraph = 0; SubGraph <= 10; SubGraph++)  

    sc.Subgraph[SubGraph][Index] = sc.BaseDataIn[SubGraph][Index]; 



  sc.DateTimeOut[Index] = sc.BaseDateTimeIn[Index]; 


  ShiftArray[Index] = 0; 


  if(Index < 1) 



  // don't process the same index again 

  if (sc.PersistVars->i1 >= sc.Index) 



  // calculate start date for current index 

  SCDateTime StartDateTimeOfCurIndex = sc.BaseDateTimeIn[sc.Index].GetDate(); 



  if(sc.StartTimeOfDay > sc.BaseDateTimeIn[sc.Index].GetTime()) 

    StartDateTimeOfCurIndex -= DAYS; 


  if(sc.BaseDateTimeIn[Index-1] >= StartDateTimeOfCurIndex) 



  // save last processed index. We should process it only once 

  sc.PersistVars->i1 = Index; 


  float Shift = sc.Subgraph[SC_OPEN][Index] - sc.BaseDataIn[SC_LAST][Index-1];; 


  for (int i = Index - 1; i >= 0; i--) 


    float CumulativeShift = Shift + ShiftArray[i]; 


    // shift prices prices 

    sc.Subgraph[SC_OPEN][i] = sc.BaseDataIn[SC_OPEN][i] + CumulativeShift; 

    sc.Subgraph[SC_HIGH][i] = sc.BaseDataIn[SC_HIGH][i] + CumulativeShift; 

    sc.Subgraph[SC_LOW][i] = sc.BaseDataIn[SC_LOW][i] + CumulativeShift; 

    sc.Subgraph[SC_LAST][i] = sc.BaseDataIn[SC_LAST][i] + CumulativeShift; 


    //recalculate averages 



    // update shift value 

    ShiftArray[i] += Shift; 



Reply With Quote
  #2 (permalink)
Elite Member
las vegas
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
Posts: 1,147 since Feb 2010
Thanks: 304 given, 835 received

Maybe try changing StartDateTimeOfCurIndex -= DAYS; to StartDateTimeOfCurIndex -= MINUTES;

Reply With Quote
  #3 (permalink)
Trading Apprentice
New York United States
Futures Experience: Advanced
Platform: TradeNavigator, Sierra Charts
Broker/Data: IB
Favorite Futures: ES
Posts: 9 since Apr 2011
Thanks: 0 given, 0 received

Thanks, I tried that it does not work. I really would appreciate help.


Reply With Quote


futures io > > > > Bar by Bar degap

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book Discussion: Reading Price Charts Bar by Bar by Al Brooks cunparis Traders Hideout 530 October 19th, 2016 07:45 PM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 04:49 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
Whats the difference between Bar Magnifier & look inside bar testing? crbucks MultiCharts 1 May 4th, 2011 12:22 AM
Image:al brooks reading price charts bar by bar.jpg Big Mike Trading Wiki Images 0 July 1st, 2010 08:00 PM

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

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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-05-27 in 0.06 seconds with 19 queries on phoenix via your IP