[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Anyone using a System-CheckSum?


  • Date: Sat, 27 Feb 2010 10:58:35 -0500
  • From: Dennis Brown <see3d@xxxxxxxxxxx>
  • Subject: Re: [amibroker] Anyone using a System-CheckSum?

PureBytes Links

Trading Reference Links



Herman,

Good idea.  One possibility is build it into each module.  If your formulas are based on smaller include modules, then you can include a sequence number based on a shortened date and edit number of the last change 20100227 edit 1 (e.g., 00227.01), then any edits to the code requires bumping the sequence number in the first line of the code:

checksum += 00227.01;

Your top level system:
checksum = 0;
theExpectedChecksum = someConstant;

// All the includes go here

If (checksum != theExpectedChecksum ) 
  {
      //popup the expected vs calculated result
  }

The first time after a change, the warning will give the right result that can be edited into the top level value of theExpectedChecksum.

BR,
Dennis

On Feb 27, 2010, at 10:07 AM, Herman wrote:



Hello,

I   would   like   to  create a System-CheckSum, for example sum the last DateTime of each of the component formulas and/or data files used by the system. This would provide me, based on a single number, a way to verify that all computers are using the same code and using the same data files. I know files are supposed to be synchronized but I would feel better if there were an additional Check. I can't simply sum the DT of all shared files because not all are always used.

I played with the code below and even tried using an include to read the DateTime of the formula including it. But I can't get it to go.

There must be an easier/better way but it has to be automated. 

Is anyone doing this or have any ideas?

Thanks,
herman

Filename = "C:\\SharedFormulas\\"+StrLeft(_DEFAULT_NAME(),StrLen(_DEFAULT_NAME())-2);
FileModified= fgetstatus( Filename, 1, 3 );
// CheckSum = sum of FileModified DTs



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___