Monday, December 01, 2008     | Register
TradersStudio Forums
Subject: Translate Median Function

You are not authorized to post a reply.   
Author Messages
aldavis
Posts:2

06-02-2006 11:13 AM Alert 

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?

murray
Posts:431

06-02-2006 11:18 AM Alert 

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.
Forums > Technical Trading > Developing Trading Systems > Translate Median Function



ActiveForums 3.6
TradersStudio® Copyright 2004-2008 All Rights Reserved   |  Privacy Statement  |  Terms Of Use