380

Hi guys,

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

Regards.

230

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

}

1081

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?
39023

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
380

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

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.

237

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.
380

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.

237

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.