How to add expiry time to your indicator?

To add comments, please log in or register
Shailesh Mishra
380
Shailesh Mishra  

Hi guys,

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

Regards.

iRick
230
iRick  
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

}

kypa
1081
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?
Alain Verleyen
39023
Alain Verleyen  
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
Shailesh Mishra
380
Shailesh Mishra  
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. :)
kypa
1081
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.

Trader Trader
237
Trader Trader  
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.
Shailesh Mishra
380
Shailesh Mishra  
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.

Trader Trader
237
Trader Trader  
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. 
To add comments, please log in or register