Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Indicators - Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2006, 09:06 PM
Member
 
Join Date: Apr 2006
Posts: 15
emersond is on a distinguished road
Exclamation Setting An Expiration Date On Indicator

How do you set an expiration date for an indicator; so that when that date
is reached the indicator ceases to operate?

I found this code; but all it does is create an alert. However, the indicator still works.

if ((Day() >= 02) && (Month() >= 10) && (Year() >= 2006))
{
Alert("Trial has ended. Please contact youremailaddress@whatever.com");
return(0);
}


Thanks in advance for any help on this matter.

Last edited by emersond; 10-01-2006 at 09:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-02-2006, 01:00 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
if (Curtime()<D'2006.10.02 00:00')
{
indicator work.......
}
else
{
alert(...);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-02-2006, 01:15 AM
Junior Member
 
Join Date: Aug 2006
Posts: 19
solaris is on a distinguished road
Quote:
Originally Posted by phoenix
if (Curtime()<D'2006.10.02 00:00')
{
indicator work.......
}
else
{
alert(...);
}
phoenix,

how about so it can only be used in one computer and the licensing key? not that it will be commercialized; just so it will be for limited users and controlled distribution only.

thanks,

solaris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-02-2006, 01:41 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
give your customer a register no. that only your customer will know

like my reg. no. = G4258DLLK8

then
if(regno==G4258DLLK8)
{
those code above
}
else
{
Alert("Incorrect Register No.");
}
------------------------------
but this is a manual process
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-02-2006, 02:35 AM
Junior Member
 
Join Date: Aug 2006
Posts: 19
solaris is on a distinguished road
Quote:
Originally Posted by phoenix
give your customer a register no. that only your customer will know

like my reg. no. = G4258DLLK8

then
if(regno==G4258DLLK8)
{
those code above
}
else
{
Alert("Incorrect Register No.");
}
------------------------------
but this is a manual process
thanks again, phoenix. manual process is fine since it is not for mass distribution. i will give it a try and let you know.

solaris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-02-2006, 12:04 PM
Member
 
Join Date: Apr 2006
Posts: 15
emersond is on a distinguished road
Thanks

Thanks guys...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-08-2006, 05:51 PM
Junior Member
 
Join Date: Aug 2006
Posts: 19
solaris is on a distinguished road
phoenix,

I used your codes as you have indicated in your previous posts here. However, I am still getting an error when I compiled it. Would you please help fix it. Here is what I have done:

Code:
if (Curtime()<D'2006.10.02 00:00')
{
"XWZ works"
else
{
Alert("Current Use License Expired. Please contact XWZ@yahoo.com");
}

if(regno==G4258DLLK8)
{
"those code above"
}
else
{
Alert("Incorrect Register No.");
}
Here is the error message I am getting:
'\end_of_program' - more than 1 symbol

I truly appreciate your help.

solaris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-09-2006, 01:23 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
if (Curtime()<D'2006.10.02 00:00')
{
"XWZ works"
}
else
{
Alert("Current Use License Expired. Please contact XWZ@yahoo.com");
}

if(regno==G4258DLLK8)
{
"those code above"
}
else
{
Alert("Incorrect Register No.");
}
--------------------------------

you forgot the pink one
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-09-2006, 03:12 PM
Member
 
Join Date: Apr 2006
Posts: 54
hidethereal is on a distinguished road
Quote:
Originally Posted by phoenix
if (Curtime()<D'2006.10.02 00:00')
{
indicator work.......
}
else
{
alert(...);
}
So if I wanted an indicator to work for two weeks from today 10/09/06 how would I set the code?

Is this correct?

if (Curtime()>D'2006.10.23 00:00')
{
"Auto Trader trial period"
}
else
{
alert("End of trial period");
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-10-2006, 12:47 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
datetime allowtime = D'2006.10.01 00:00';
datetime allowto = D'2006.10.13 00:00';

if(CurTime()>allowtime && CurTime()<allowto)
{
............................your code inside this
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EA expiration date jyrik Expert Advisors - Metatrader 4 6 04-12-2007 04:32 PM
Place expiration on EA troydavis1010 General Discussion 1 04-10-2007 09:05 PM
How to put the Expiry date in EA MACD Expert Advisors - Metatrader 4 1 01-26-2007 12:59 PM
Up-date problem... ttt123 General Discussion 4 02-06-2006 09:41 AM


All times are GMT. The time now is 04:04 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.