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

Re: [EquisMetaStock Group] Need help with formula



PureBytes Links

Trading Reference Links




TaoTrader,
This code is not possible to execute in MS, as 
the MS language does not accept the normal programming syntax "if( condition, 
then)".
It needs it like this: "if( condition, then, 
else)"
What conditions are you going to impose for the 
"else"?
DusantChief Architect<A 
href="">http://www.candlestrength.com/
<BLOCKQUOTE dir=ltr 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=taotrader@xxxxxxxxxxx 
  href="">TaoTrader 
  To: <A 
  title=equismetastock@xxxxxxxxxxxxxxx 
  href="">equismetastock@xxxxxxxxxxxxxxx 
  
  Sent: Tuesday, June 29, 2004 6:27 
PM
  Subject: Re: [EquisMetaStock Group] Need 
  help with formula
  
  Thanks, Dusant, for your reply.  
  Unfortunately, external functions won't help me.  In my broker's forex 
  charting program you can write your own indicator scripts using a subset of 
  the MS commands.  However, it isn't possible to call external functions 
  via DLLs.  I thought if I could just program Renko charts with the 
  available MS commands that that would suffice.
   
  By the way, I've just come across another script 
  (see below) at a German trading site.  However, it looks like it's 
  generating a line chart based on Renko data instead of the chart itself.  
  I ran it as is in my program but it did't work ( no line, just blank).  
  If someone could run the script im MS and let me know what it works.  The 
  code below includes comments for each line.
   
  Cheers,
  Gernot
   
  
  K:=150; {brick size}
  RenkoLine:=if(Cum(1)=1,Close,
  {Last Renko white (up)?}
  if(PREV>=0, 
  {Last Renko is white.}
  {Reversal?}
  if(C<=PREV-2*K,
  {Reversal!}
  -(PREV-floor(Max(PREV-C,0)/K)*K),
  {New white Renkos?}
  floor(Max(C-PREV,0)/K)*K+PREV),
  {Last Renko is black (down).}
  {Reversal?}
  if(C>=abs(PREV)+2*K,
  {Reversal!}
  -PREV+floor(Max(C-abs(PREV),0)/K)*K,
  {New black Renkos?}
  floor(Max(abs(PREV)-C,0)/K)*K+PREV)));
  RL:=abs(RenkoLine);
  RL;
   
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A title=dusant@xxxxxxxxxxxxxxxxxx 
    href="">Dusant 
    To: <A 
    title=equismetastock@xxxxxxxxxxxxxxx 
    href="">equismetastock@xxxxxxxxxxxxxxx 
    
    Sent: Tuesday, June 29, 2004 8:06 
    AM
    Subject: Re: [EquisMetaStock Group] 
    Need help with formula
    
    TaoTrader,
    <A 
    href="">http://195.131.102.216/cgi-bin/ksr?file=msx_ksr_en
    You need to download the DLL as the codes are 
    written with the support of the external DLL.
    You need not write any code yourself, import 
    the formula using their files.
    This DLL has a great utility to write values 
    to a text file too.
    DusantChief Architect<A 
    href="">http://www.candlestrength.com/
     
    <BLOCKQUOTE dir=ltr 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      <A title=taotrader@xxxxxxxxxxx 
      href="">TaoTrader 
      To: <A 
      title=equismetastock@xxxxxxxxxxxxxxx 
      href="">equismetastock@xxxxxxxxxxxxxxx 
      
      Sent: Tuesday, June 29, 2004 8:00 
      AM
      Subject: Re: [EquisMetaStock Group] 
      Need help with formula
      
      Hi Roy,
       
      Thanks for the response.  Yeah, I 
      realized the script is not in Metastock language.  However, the odd 
      thing is that I found the formula at a web site on external meatstock 
      function.  See web attached web site:
       
      <A 
      href="">http://www.ksr.sp.ru/msx/msxen.htm
       
      and go down to:
      4. 
      Renko-Adaptive indicator "<FONT 
      color=#008000>Renko_Adaptive
      <FONT face=Verdana color=#008000 
      size=2> 
      I understand you're busy and wouldn't ask you 
      to take up your time.  I posted the request in the forum because 
      Metastock has built-in Renko charts.  So, I thought that there must 
      be a way to also code them with the MS language.  Although I 
      understand that the built-in stuff is not likely to be written MS 
      format.
       
      Thanks again for your reply
      Gernot







Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/equismetastock/ 
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.