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

Re: [EquisMetaStock Group] Need help with formula



PureBytes Links

Trading Reference Links




Gernot,
:P
First of all, let me confess that the thought of 
using "null" did not occur to me. 
Second, let me try it out in MS, and then 
revert.
BTW, did you try out the renko formula in the 
Russian site, which I had posted earlier. Seems they have already done the hard 
work.
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: Thursday, July 01, 2004 10:04 
  AM
  Subject: Re: [EquisMetaStock Group] Need 
  help with formula
  
  Dusant, 
   
  I understand that Null may not be mentioned but I 
  have an MS script with a Null statement that works just fine in my charting 
  program.  Check it out and see if it runs.
   
  The script is a bicolored MA.  The MA is one 
  color (of your choosing) if price is above it, and another if price is below 
  it.
   
  <FONT face=Arial 
  size=2>MA:=mov(pr1,pd,mt);MA_UP:=if(pr>MA,MA,null);MA_DOWN:=if(pr<MA,MA,null);MA_UP;
  MA_DOWN;
   
  The reason there is a "pr" and a "pr1", so that 
  you can choose different prices for the two.
   
  Gernot
   
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A title=dusant@xxxxxxxxxxxxxxxxxx 
    href="">Dusant 
    To: <A 
    title=equismetastock@xxxxxxxxxxxxxxx 
    href="">equismetastock@xxxxxxxxxxxxxxx 
    
    Sent: Wednesday, June 30, 2004 11:08 
    PM
    Subject: Re: [EquisMetaStock Group] 
    Need help with formula
    
    TaoTrader,
    The MS formula builder does not allow 
    "null".
    Check it out.
    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: Wednesday, June 30, 2004 4:52 
      PM
      Subject: Re: [EquisMetaStock Group] 
      Need help with formula
      
      Dusant, how about "Null"
       
      if condition then "action", else "no 
      action" (Null)
       
      Gernot
      <BLOCKQUOTE 
      >
        ----- Original Message ----- 
        <DIV 
        >From: 
        <A title=dusant@xxxxxxxxxxxxxxxxxx 
        href="">Dusant 
        To: <A 
        title=equismetastock@xxxxxxxxxxxxxxx 
        href="">equismetastock@xxxxxxxxxxxxxxx 
        
        Sent: Wednesday, June 30, 2004 5:35 
        AM
        Subject: Re: [EquisMetaStock Group] 
        Need help with formula
        
        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:
              <FONT 
              color=#004080>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
              <FONT face=Arial 
          size=2>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.