How to close/open trade using time..... Please give any hint or references....
int bars = iBars(_Symbol, PERIOD_CURRENT);
for (int i=0; i<bars && i<20; i++) {
}
vilas korke:
How to close/open trade using time..... Please give any hint or references....
How to close/open trade using time..... Please give any hint or references....
int
bars = iBars(_Symbol, PERIOD_CURRENT); for
(int
i=0;
i<bars && i<20;
i++) { }

Structure of the Date Type - Data Structures - Constants, Enumerations and Structures - MQL4 Reference
- docs.mql4.com
Structure of the Date Type - Data Structures - Constants, Enumerations and Structures - MQL4 Reference
vilas korke:
How to close/open trade using time..... Please give any hint or references....
How to close/open trade using time..... Please give any hint or references....
int
bars = iBars(_Symbol, PERIOD_CURRENT); for
(int
i=0;
i<bars && i<20;
i++) { }
- Your code has nothing to do with time. It just iterates over all bars. No need for the function call in MT4,
just use
Bars.
- Get the current time and check.
Find bar of the same time one day ago - Simple Trading Strategies - MQL4 programming forum
William Roeder:
Thanks... Sir for your guidance.
- Your code has nothing to do with time. It just iterates over all bars. No need for the function call in MT4,
just use
Bars.
- Get the current time and check.
Find bar of the same time one day ago - Simple Trading Strategies - MQL4 programming forum

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register