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

RE: [EquisMetaStock Group] How to prevent re-calculating values?



PureBytes Links

Trading Reference Links




I 
thought that my first email gave examples, but I will expand on them 
here.
<SPAN 
class=523575222-01032003> 
The 
following are typical examples of code that might appear in the "buy", "sell", 
"short" and "cover" statements:
<SPAN 
class=523575222-01032003> 
<SPAN 
class=523575222-01032003>AvgVolume := mov(volume,20,s);
<SPAN 
class=523575222-01032003>TotalRange := hhv(high,20) - 
llv(low,20);
myATR 
:= ATR(20);
<SPAN 
class=523575222-01032003> 
I 
might have six or seven statements like those above.   

<SPAN 
class=523575222-01032003> 
Then, 
my "buy" statement might say something like:
<SPAN 
class=523575222-01032003> 
Close 
> 1 and AvgVolume > 20000 and TotalRange > myATR * 
2.
<SPAN 
class=523575222-01032003> 
My 
"sell" statement might say something like:
<SPAN 
class=523575222-01032003> 
Close 
> 6 and AvgVolume > 30000 and TotalRange > myATR * 
2.5
<SPAN 
class=523575222-01032003> 
I 
would like to be able do some calculations (AvgVolume, TotalRange, etc.) 
only once.   Or, as I questioned in my first email on the subject, is 
MetaStock smart enough to know that the calculation has already been done 
once?
<BLOCKQUOTE 
>
  <FONT face="Times New Roman" 
  size=2>-----Original Message-----From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx]Sent: Saturday, March 01, 2003 5:44 
  PMTo: equismetastock@xxxxxxxxxxxxxxxSubject: Re: 
  [EquisMetaStock Group] How to prevent re-calculating 
  values?Chuck,Could you supply a small sample 
  code of how you do it now ...Then possibly asolution could be 
  found.Anthony-------Original Message-------From: 
  equismetastock@xxxxxxxxxxxxxxxDate: Saturday, March 01, 2003 
  17:38:50To: equismetastock@xxxxxxxxxxxxxxxSubject: [EquisMetaStock 
  Group] How to prevent re-calculating values?Like a lot of MetaStock 
  programmers, I tend to calculate several values ineach of my 
  buy/sell/short/cover scenarios.  Most of these calculations arethe 
  same.  For instance, I may need a 20-day moving average of volume 
  ineach statement.   Or I may calculate the total range (max high 
  minus minlow) over 20 days, etc.My concern is the amount of time 
  wasted to recalculate these things fourtimes.  This is not a new 
  concern.  It is one that I have had since 1986 andprobably two 
  million optimizations have gone under the bridge since then.In 
  TradeStation, I am able to ensure that such calculations are done 
  onlyonce.   After 17 years of using MetaStock, I still don't 
  know a way to do itin MS.   Perhaps MS is smart enough to know 
  that it has already calculatedthe 20-day moving average of volume and 
  won't do it again?Any insights on this problem/opportunity would be 
  appreciated.  I don't wantto wait another 17 years to find out that I 
  could have saved thousands ofhours of CPU 
  time.CheersYahoo! Groups 
  SponsorADVERTISEMENTTo unsubscribe from this group, 
  send an email 
  to:equismetastock-unsubscribe@xxxxxxxxxxxxxxxYour use of 
  Yahoo! Groups is subject to the Yahoo! Terms of Service. To 
  unsubscribe from this group, send an email 
  to:equismetastock-unsubscribe@xxxxxxxxxxxxxxxYour 
  use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT  









To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.