As in it won't work after a certain period?
Then something like:
if (TimeCurrent() < ExpiryDatetime)
{
Run Indicator code
}
A philosophical question arises in this situation - if you can't figure out how to set expiry time do you think your indicator is worth having an expiry time?
kypa:
A philosophical question arises in this situation - if you can't figure out how to set expiry time do you think your indicator is worth having an expiry time?
loool
A philosophical question arises in this situation - if you can't figure out how to set expiry time do you think your indicator is worth having an expiry time?
kypa:
A philosophical question arises in this situation - if you can't figure out how to set expiry time do you think your indicator is worth having an expiry time?
its interesting to meet a philosophical trader. :)
A philosophical question arises in this situation - if you can't figure out how to set expiry time do you think your indicator is worth having an expiry time?
kypa:
Gents, I see signs of bullying here...not worth intimidating someone or making fun of someone's request please.Interesting to meet a physicist as well.
How would you write a differential equation describing (forces of) supply and demand pushing and pulling the price? And how would you plot it on a chart?
Maybe that indicator would be worth setting an expiry time.
Shailesh Mishra's question may seem trivial at first sight... but its more complicated than you think, especially if you are not a professional coder.
You'll need to get the current real date that is independent on the date stamp embedded with incoming tick data. You'll need to import some system functions to get the real current date from the PC system through DLL, then compare this with whatever expiry date you set.
Hopefully someone out there could assist Shailesh Mishra with the full code, or explain how to go about it rather than shaming of someone's efforts and quest for knowledge.
Trader Trader:
Gents, I see signs of bullying here...not worth intimidating someone or making fun of someone's request please.
Gents, I see signs of bullying here...not worth intimidating someone or making fun of someone's request please.
Shailesh Mishra's question may seem trivial at first sight... but its more complicated than you think, especially if you are not a professional coder.
You'll need to get the current real date that is independent on the date stamp embedded with incoming tick data. You'll need to import some system functions to get the real current date from the PC system through DLL, then compare this with whatever expiry date you set.
Hopefully someone out there could assist Shailesh Mishra with the full code, or explain how to go about it rather than shaming of someone's efforts and quest for knowledge.
Calm down friends. Its ok.
The solution suggested by Irick and some other friends from other websites works well. No need for dll etc to complicate matters.
Shailesh Mishra:
Note that the solution by Irick will not work during backtests...i.e the indicator will still work in backtest mode even after the expiry. But it all depends on your requirements really.
Calm down friends. Its ok.
The solution suggested by Irick and some other friends from other websites works well. No need for dll etc to complicate matters.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi guys,
Can someone tell me how to add a expiry time for my indicator.
Regards.