• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 1:53pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 1:53pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

3 Bar Fractal with mid-bar and bar on each side 11 replies

Tick Size, Tick Rate, Tick Spread, and Tick Logger indicators 36 replies

Tick by Tick trading? 5 replies

To Tick or not to Tick? (any strategy here?) 7 replies

Pin bar, pin bar, pin bar 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
Tags: Programming > no tick in bar, run start()?
Cancel

Programming > no tick in bar, run start()?

  • Post #1
  • Quote
  • First Post: Aug 13, 2010 1:05am Aug 13, 2010 1:05am
  •  Skyhr
  • | Joined Oct 2006 | Status: Order in Chaos | 213 Posts
Hi,


In a theoretical situation: In a 1min bar, no activity occurs. The next bar opens. Even though no tick has occured, does the start()? function run when the new bar opens?


This is important in programming for me.
  • Post #2
  • Quote
  • Aug 13, 2010 2:01am Aug 13, 2010 2:01am
  •  CodeMeister
  • Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
The division of ticks into bars is something that is done for organizing the data into a more understandable format for us humans to analyze. MT4 is built as a tick event handling system. In fact it takes some effort to get MT4 to recognize bars and their significance. So the answer to your question (which by the way isn't theoretical - I have seen it) is that start() runs for every tick whether the gap is less than second or more than a minute.
 
 
  • Post #3
  • Quote
  • Aug 13, 2010 3:06am Aug 13, 2010 3:06am
  •  Oksana17
  • | Membership Revoked | Joined Sep 2007 | 903 Posts
Yes, I think it will go through the start() function.
You can easily test by adding this to the code:

Comment( TimeCurrent() ); . . .in the start() function.
Then, when you see the M1 bar go to the next bar without ticking at all for a minute, you can see if the Comment updates the seconds.
Request custom Expert Advisor or Indicator: dostapyuk "at" gmail . com
 
 
  • Post #4
  • Quote
  • Last Post: Aug 14, 2010 10:37am Aug 14, 2010 10:37am
  •  CockeyedCowboy
  • Joined Apr 2006 | Status: Trader Keit | 286 Posts
Quoting Skyhr
Disliked
Hi,


In a theoretical situation: In a 1min bar, no activity occurs. The next bar opens. Even though no tick has occured, does the start()? function run when the new bar opens?


This is important in programming for me.
Ignored

Sky

MQ platform can not make any changes to the charts with out a fresh incomeing tick, there for when ever you see a new bar start it is in response to an incoming tick. If no new tick has arrived your platform can not show the new bar untill that even occours, which can be well into the start time of the new bar. I have notice in the past that if no change in price has occured (with in a bar) you may even have missing bars in the M1 more then higher ones, this is usally seen at major news time were every thing is hinged on the out come of the news.

Other conditions you must know about is that not all movment in the charts are in response to order flow of your broker. Your broker is continually updated his price based on the market and it can be alot of incoming ticks that are only price updates of the market not neccessarily transactions of your broker. so tick volume has some limitations.

Also if you have two charts up and both have indies and or eas scripts etc.. both do not run (update) at the same time.... I have in the past tested how MT runs and found out a lot of interesting things. Like if you have two charts with the same currency pair with the same or different time scale, you think that both charts will update together but that is not the case. only one chart will update at a time you can even see this occour at times under certain conditions. How do you know which chart will update frist? Look at your title bar of each chart the one that is hi-lighted will update first then the other one will update in that order. If you have more then two charts up (same currency pair)the order appears to be in the order of last viewed (hi-lighted).

There is alot of other limitations in MT that are not disclosed very well by the authors. if one is writing code, one should know the interactions between code blocks (EAs, Scripts and Indicators).

Keit
Trader Keit ... Methods Of A Dirt Road Mad Man....
 
 
  • Platform Tech
  • /
  • Programming > no tick in bar, run start()?
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023