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

RE: [EquisMetaStock Group] "AND" operands to functions instead of "OR"



PureBytes Links

Trading Reference Links




<FONT color=#0000ff 
size=2>Mike,
<FONT color=#0000ff 
size=2> 
Assuming I 
interpret your request correctly, I am sure the Group can come up with a more 
elegant solution but to get the ball rolling try this for your query number 
1:
 
<FONT 
color=#008080>Periods:=Input("Lookback",1,1000,5);Count:=Sum(<FONT 
color=#ff0000>If(V > Mov(V,20,S),1,0) 
,Periods);Persistence:=If(Count = Periods, 1,0);<FONT 
color=#008080>Persistence;
<FONT color=#0000ff 
size=2> 
You can 
substitute your own formula where the above code is RED. 
See the attached gif 
chart.
<FONT color=#0000ff 
size=2> 
So far as your 
query number 2:
<FONT color=#0000ff 
size=2> 
I used to use the 
When() function for folding formulae in the System Tester. But I believe it is a 
syntax thing that can be eliminated and the code will work without it which 
gives you the benefit of one less set of parenthesis to get 
right!
<FONT color=#0000ff 
size=2> 
You will 
appreciate that the Indicator above "Persistence" is indicative only and 
not likely to make you your next million.
 
Hope the above 
helps - good trading.
 
<FONT face="Kunstler Script" color=#008000 
size=5>Regards,
<FONT face="Kunstler Script" color=#008000 
size=5> 
Gordon 
Sutherland

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Mike Loveday 
  [mailto:mike.loveday@xxxxxx] Sent: Thursday, 17 July 2003 6:43 
  p.m.To: equismetastock@xxxxxxxxxxxxxxxSubject: 
  [EquisMetaStock Group] "AND" operands to functions instead of 
  "OR"
  Hi 
  Guys,
  <SPAN 
  class=039283006-17072003> 
  2 questions 
  here...
  <SPAN 
  class=039283006-17072003>1/
  Trying to find a 
  way to have a test condition check for a match on all data periods 
  in the array, rather than just 'one' which passes within the defined 
  period.
  <SPAN 
  class=039283006-17072003> 
  ie; the 'Alert' 
  function for instance passes if 'any' of the periods defined match the test 
  conditions. Is there a way to define a test condition whereby ALL of the 
  defined periods have to pass? 
  A condition 
  must be true over all of 5 periods.. instead of being held true even if it's 
  true on only one of the periods. A manual way of doing this is using the REF 
  function, but it's very laborious if testing anymore than just a few periods 
  as it has to be tested for each of the historical periods 
  referenced. 
  <SPAN 
  class=039283006-17072003>2/
  'When' 
  function.
  This is not 
  defined in the list of functions, and not referenced in the help files. 
  However, I have a formula that uses it, but the function itself is not defined 
  specifically yet Metastock accepts and uses it?? ..are there any more like 
  this?.. and any help / explanation files around for it (would like to be able 
  to see what it's doing).
  <SPAN 
  class=039283006-17072003> 
  <SPAN 
  class=039283006-17072003>Thanks..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.



Attachment:
Persistence.gif

Attachment: Description: "Description: GIF image"