Quote:
Originally Posted by newdigital
Look at this thread How to start with MetaTrader and forex
To say shortly, the coders are coding the systems on close bar. Almost always. There are some few exceptions related to open bar scalpers and so on.
What is coding on close bar?
It is the same with real manual trading: the signal is valid if you see it on previous(or close) bar.
Numeration is started with bar number 0 (current open bar). In this case previous bar is bar #1 and so on.
It is no any programming problem to check the condition of previous 5 bars's close.
Check this thread (first post) for more information How to start with MetaTrader and forex
|
Thanks for the info.
I have an issue. In terms of closing price, for previous bars, it is very obvious. What about the closing price of a current bar, the normal calculation is the last price will be the closing price to be calculated, am I right on this? Lets say I am using 30 min chart, time is 14:12:35, the normal coding is calculating the tick at 14:12:35, then the previous close would be any tick just before this time or the completed_closed_price at 14:00:00? This is where Im confused when Im coding.
In another secenio, I actually want to compare the close price at different closing level. Using the above same time, I want to compare the close price at 14:12:35 and the closing price at 14:00:00, 13:30:00, 13:00:00 etc.
I think there are 2 ways to code to accomplish these 2 different secenio.
Please point out the coding differences between these 2, just a few code no need the whole code so I can get the idea. I dont really get it by reading the documentation.
Thanks.
