Register Login
Forums    February 9, 2012
TradersStudio Forums
Translate Median Function
Last Post 06-02-2006 11:18 AM by mur ang. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev
You are not authorized to post a reply.
Author Messages
Al Davis
New Member
New Member
Posts:2

--
06-02-2006 11:13 AM

    I am having a problem translating the "Median" function from Easylanguage.  Here is the code:

    Input: PRICE(Numeric),LENGTH(Numeric);
    Median = IFF(FracPortion(LENGTH/2) = 0,(NthHighest(LENGTH/2,PRICE,LENGTH)+NthHighest((LENGTH/2)+1,PRICE,LENGTH))/3,NthHighest(IntPortion((LENGTH/2)+1),PRICE,LENGTH))

     

    How to translate, when math functions like FracPortion and IntPortion are unabled to be opened in the Power Editor?

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    06-02-2006 11:18 AM

    First of all iff is really iif in TradersStudio. This will be fixed in next release.

     IntPortion is Cint

     FactPortion would be

       Number-CInt(Number)

    I hope this helps.

    We are including median function in first bug fix release.

     

     

    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement