
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
Why not? User can enter any datetime and it works fine. If you want a calendar pop up, you're going to have to have a GUI coded.
Use this code
Use this code
Nope. This will initialized the parameter with compilation date, not current time.
Try this
It will put you on current date at midnightTry this
It will put you on current date at midnightTry it tomorrow.
Maybe I was not clear enough ? Using this
or this
or whatever other way you could find to express it, will use the compilation date. Of course, today, you compile, so it's the same, but on the future it will be the same date, I mean the compilation date which will not be any more "today" (the day you run it).
Try it tomorrow.
Maybe I was not clear enough ? Using this
or this
or whatever other way you could find to express it, will use the compilation date. Of course, today, you compile, so it's the same, but on the future it will be the same date, I mean the compilation date which will not be any more "today" (the day you run it).
Sorry my delay.... try this and works... thanks!
extern datetime pivotDay;
int dayIndex;
int start()
{
if(pivotDay == 0)
{
pivotDay = TimeCurrent();
}
dayIndex = iBarShift(NULL,PERIOD_D1,pivotDay);
.................................................................