Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating an early bar close

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Konoakapen View Post
    I guess I'm still confused. If I do what you said, and set up sessions each day from 3:55 till the next day at 3:50, I will get day bars which technically contain data from two days, but will be stamped with the ending day at 3:50, correct? I just want 5 of these uniform bars a week---naturally one would have to contain data from both Friday and Monday, and would be stamped Monday. How would I create that? I don't need the data from the weekend, I just wanted to have a singular day bar from Friday at 3:55 to Monday at 3:50.

    By the way, thanks a lot for all your help...I can't seem to find information on what I'm trying to do anywhere.
    In conformity with the logical principle of "The Law of the excluded middle" you have only 2 choices: to work within the structure of the markets or to work in non-conformity with same.

    The markets have a structure which precludes having sessions that span non-trading (weekend) days. If you refuse to work within that structure, then you have to write the entire code to do so yourself. The markets are unlikely to be adjusted for your convenience, so you are the one who has to do the adjusting.

    On the other hand, as an example of how such is handled, most of the Globex indices have 5 trading days, because, spanning midnight Eastern Time, they start in one day and end the next. So the first trading day runs from Sunday to Monday, and the trading week ends on Friday. Depending on what you are trading, starting the day on Sunday may or may not make trading sense, but it will make programming sense.

    You can elect to mimic, and use a variation, of the Globex structure, or you can decide to make your code arrangements to handle weekends however you wish, and completely ignore the session manager, in the manner that I already described.

    As another, more kludgy alternative, as a day can have more than one session defined, you may choose to define your Monday session as starting on Monday, and then if you insist on entering trades and holding them over the weekend, you can define a second abbreviated session for Friday, which starts and ends on Friday: a session whose sole purpose it would appear would be to provide a starting bar so that you can enter your weekend trade that is generated on Friday.
    Last edited by koganam; 06-13-2014, 07:03 AM. Reason: Corrected spelling.

    Comment


      #17
      May be someone can suggest how to create an early bar close with the Kagi or PnF Type of bars.The problem is that when the last bar closes,the new one is a miles away(for whatever reason) from the previous bar`s close.If you know what i`m trying to ask,of course.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X