How to add expiry time to your indicator?

 

Hi guys,

Can someone tell me how to add a expiry time for my indicator.

Regards.

 
Shailesh Mishra:

Hi guys,


Can someone tell me how to add a expiry time for my indicator.


Regards.

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
 
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. :)
 

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.

 
kypa:

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.

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.
 
Trader Trader:
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:

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.

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. 
Reason: