PureBytes Links
Trading Reference Links
|
List,
Well, I'm still trying to move our Intermediate Term Signals into MS and I'm
still having problems. I have completed all of the coding and am now in the
debugging stage.
First, here are two calculations that I've tried. One works (the one with
PREV) and one doesn't. After all of the help the last time around, I
naturally tried the Ref() function because everyone said it was the
preferable approach.
Any and all help is appreciated.
COMHCRR:= If( FmlVar("COM-CNTRY","COMCR") > 0 , PREV + 1 , If(
FmlVar("COM-CNTRY","COMCR") < 0 , PREV - 1 , PREV ) );
COMHCRR;
COMHCRT:= If( FmlVar("COM-CNTRY","COMCR") > 0 , Ref( COMHCRT, -1 ) + 1 ,
If( FmlVar("COM-CNTRY","COMCR") < 0 , Ref( COMHCRT , -1 ) - 1 , Ref(
COMHCRT , -1 ) ) );
COMHCRT;
This is a simple calculation where I accumulate a total, adding 1 if the
indicator > 0, subtracting 1 if it is < 0 and just carrying the previous
day's value forward if there is no change. Nothing sophisticated.
My second minor problem is that the answer is incorrect. I've exported my
MS SPI data into a Clipper database to insure an identical test data set.
Based upon that, the results should be identical, especially since this
calculation is so simple. I haven't double-checked that COMCR calculation
in both systems, but I will right now. I should say that I had verified
that calculation before but I will do it again just to make sure nothing
else managed to get screwed up.
Guy
Never be afraid to try something new. Remember, amateurs built the ark,
professionals built the Titanic.
|