Like, in a Moving Average, if the 2 lines cross, i try to take the time of their meet, and try to use in a condition. There is an option called iTime for that, but what about the date??...how can i take out the date too??
Print(TimeToStr(crossingtime,TIME_DATE)," ",TimeToStr(crossingtime,TIME_SECONDS));
Is this what you mean ??
Like, in a Moving Average, if the 2 lines cross, i try to take the time of their meet, and try to use in a condition. There is an option called iTime for that, but what about the date??...how can i take out the date too??
- If it crossed on bar iShift, then the time is Time[iShift] or iTime(..., iShift) Both are a datetime which include both the time and the date. Use TimeToStr or the time functions
- deVries: Is this what you mean ??
TimeToStr(crossingtime, TIME_MINUTES|TIME_SECONDS)
hmmm, i think i wasn't clear....i have an indicator, and i want the order to be placed only when that condition is met, and not always when the condition is true.
Which is why, i thought i could use the time of the meeting condition to be placed in the EA, ....
hmmm, i think i wasn't clear....i have an indicator, and i want the order to be placed only when that condition is met, and not always when the condition is true.
Which is why, i thought i could use the time of the meeting condition to be placed in the EA, ....
There is no distinction between date and time, they are the same and are represented using datetime type variables. The condition may never be met though, one one tick it may be one side of the condition and on the next tick it may be other side of the condition, it might "jump over" . . .
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Like, in a Moving Average, if the 2 lines cross, i try to take the time of their meet, and try to use in a condition. There is an option called iTime for that, but what about the date??...how can i take out the date too??