| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Median in Easylanguage ![]() anyone got an ideas? | ||
| |
|
| | #2 | ||
![]() | Re: Median in Easylanguage it is simply ( H + L ) / 2
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
trader273 (04-06-2010) | ||
| | #3 | ||
![]() | Re: Median in Easylanguage duh Then I guess what I don't understand is how to get the median of a set of numbers I have. If anyone reads Dr.Steenbarger's blog he showed what he uses for price projections, and I was trying to code something up. I have five variables and I need to take the median of those 5. | ||
| |
|
| | #4 | ||
![]() | Re: Median in Easylanguage | ||
| |
|
| The Following User Says Thank You to zdo For This Useful Post: | ||
trader273 (04-06-2010) | ||
| | #5 | ||
![]() | Re: Median in Easylanguage Are you actually talking about price data arriving in real time? That's a wee bit tricky. Trouble with EL is that it's not great for more complex data structures. You could probably sort data into an array as it arrived. Whilst not difficult a bit fiddly. Median is the mid price in a sorted set of numbers right? (not the mid price). | ||
| |
|
| The Following User Says Thank You to BlowFish For This Useful Post: | ||
trader273 (04-06-2010) | ||
| | #6 | ||
![]() | Re: Median in Easylanguage Quote:
first, create an array, then put the 5 numbers in the array, then use medianarray to interrogate the array for the median.
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
trader273 (04-06-2010) | ||
| | #7 | ||
![]() | Re: Median in Easylanguage ![]() I searched through TL and some other pdf's. Here is what I got so far: Code: Array: MyArray[5](0); ArrayElement[1]=((yesthi-yestlo)/yestop)*100; ArrayElement[2]=((H2-L2)/O2)*100; ArrayElement[3]=((H3-L3)/O3)*100; ArrayElement[4]=((H4-L4)/O4)*100; ArrayElement[5]=((H5-L5)/O5)*100; V=MedianArray(myArray,5); I have everything defined, and it plots correctly. The error I got is "Index was outsite the bounds of the array" Googled that, and I thought I fixed it but not so much. Probably missing something easy... | ||
| |
|
| | #8 | ||
![]() | Re: Median in Easylanguage Code: Array: MyArray[6](0); MyArray[1] = ((yesthi-yestlo)/yestop)*100; MyArray[2] = ((H2-L2)/O2)*100; MyArray[3] = ((H3-L3)/O3)*100; MyArray[4] = ((H4-L4)/O4)*100; MyArray[5] = ((H5-L5)/O5)*100; Value1 = MedianArray(myArray,6); array numbering starts with zero, but medianarray referencing begins with array element 1. therefore you need an array of 6 to handle 5 numbers.
__________________ Only an idiot would reply to a stupid post Last edited by Tams; 04-06-2010 at 12:11 PM. | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
trader273 (04-06-2010) | ||
![]() |
| Tags |
| array, median |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Easylanguage Partner | Market Wizard | Coding Forum | 1 | 05-19-2012 04:51 PM |
| Trendline (EasyLanguage) | Tams | Coding Forum | 43 | 07-09-2011 12:36 AM |
| Antonio: Please help me on MP for easylanguage | nasdaq5048 | Market Profile | 13 | 09-23-2010 09:50 AM |
| Some EasyLanguage Help Please | jjthetrader | Coding Forum | 8 | 06-02-2008 04:20 PM |
| Andrews Pitchfork (Median Line) | justcatalin | Market Analysis | 16 | 04-06-2008 03:44 AM |