NexusFi: Find Your Edge


Home Menu

 





not trading off the seat of my pants


Discussion in Stocks and ETFs

Updated
      Top Posters
    1. looks_one Tiberius with 73 posts (112 thanks)
    2. looks_two rpm123 with 24 posts (26 thanks)
    3. looks_3 Fat Tails with 9 posts (20 thanks)
    4. looks_4 drytlewski322 with 8 posts (9 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.2 thanks per post
    2. looks_two Tiberius with 1.5 thanks per post
    3. looks_3 rpm123 with 1.1 thanks per post
    4. looks_4 drytlewski322 with 1.1 thanks per post
    1. trending_up 39,695 views
    2. thumb_up 185 thanks given
    3. group 9 followers
    1. forum 128 posts
    2. attach_file 103 attachments




 
Search this Thread

not trading off the seat of my pants

  #91 (permalink)
 
Tiberius's Avatar
 Tiberius 
Coos County New Hampshire
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 1,552 since Feb 2010
Thanks Given: 2,984
Thanks Received: 3,406

The median is the middle of a distribution: half the scores are above the median and half are below the median. The median is less sensitive to extreme scores than the mean and this makes it a better measure than the mean for highly skewed distributions. The median income is usually more informative than the mean income, for example.

The sum of the absolute deviations of each number from the median is lower than is the sum of absolute deviations from any other number. Click here for an example.

The mean, median, and mode are equal in symmetric distributions. The mean is typically higher than the median in positively skewed distributions and lower than the median in negatively skewed distributions, although this may not be the case in bimodal distributions. Click here for examples.

Computation of Median
When there is an odd number of numbers, the median is simply the middle number. For example, the median of 2, 4, and 7 is 4.

When there is an even number of numbers, the median is the mean of the two middle numbers. Thus, the median of the numbers 2, 4, 7, 12 is (4+7)/2 = 5.5.

-----------------------------------------------------------------------------------------------------------------------------------------------


Mean, Median, Mode, and Range

Mean, median, and mode are three kinds of "averages". There are many "averages" in statistics, but these are, I think, the three most common, and are certainly the three you are most likely to encounter in your pre-statistics courses, if the topic comes up at all.

The "mean" is the "average" you're used to, where you add up all the numbers and then divide by the number of numbers. The "median" is the "middle" value in the list of numbers. To find the median, your numbers have to be listed in numerical order, so you may have to rewrite your list first. The "mode" is the value that occurs most often. If no number is repeated, then there is no mode for the list.

The "range" is just the difference between the largest and smallest values.

Find the mean, median, mode, and range for the following list of values:
13, 18, 13, 14, 13, 16, 14, 21, 13

The mean is the usual average, so:

(13 + 18 + 13 + 14 + 13 + 16 + 14 + 21 + 13) ÷ 9 = 15

Note that the mean isn't a value from the original list. This is a common result. You should not assume that your mean will be one of your original numbers.

The median is the middle value, so I'll have to rewrite the list in order:

13, 13, 13, 13, 14, 14, 16, 18, 21

There are nine numbers in the list, so the middle one will be the (9 + 1) ÷ 2 = 10 ÷ 2 = 5th number:

13, 13, 13, 13, 14, 14, 16, 18, 21

So the median is 14. Copyright © Elizabeth Stapel 2004-2011 All Rights Reserved
The mode is the number that is repeated more often than any other, so 13 is the mode.

The largest value in the list is 21, and the smallest is 13, so the range is 21 – 13 = 8.

mean: 15
median: 14
mode: 13
range: 8

Note: The formula for the place to find the median is "( [the number of data points] + 1) ÷ 2", but you don't have to use this formula. You can just count in from both ends of the list until you meet in the middle, if you prefer. Either way will work.

Find the mean, median, mode, and range for the following list of values:
1, 2, 4, 7

The mean is the usual average: (1 + 2 + 4 + 7) ÷ 4 = 14 ÷ 4 = 3.5

The median is the middle number. In this example, the numbers are already listed in numerical order, so I don't have to rewrite the list. But there is no "middle" number, because there are an even number of numbers. In this case, the median is the mean (the usual average) of the middle two values: (2 + 4) ÷ 2 = 6 ÷ 2 = 3

The mode is the number that is repeated most often, but all the numbers appear only once. Then there is no mode.

The largest value is 7, the smallest is 1, and their difference is 6, so the range is 6.

mean: 3.5
median: 3
mode: none
range: 6

The list values were whole numbers, but the mean was a decimal value. Getting a decimal value for the mean (or for the median, if you have an even number of data points) is perfectly okay; don't round your answers to try to match the format of the other numbers.

Find the mean, median, mode, and range for the following list of values:
8, 9, 10, 10, 10, 11, 11, 11, 12, 13

The mean is the usual average:

(8 + 9 + 10 + 10 + 10 + 11 + 11 + 11 + 12 + 13) ÷ 10 = 105 ÷ 10 = 10.5

The median is the middle value. In a list of ten values, that will be the (10 + 1) ÷ 2 = 5.5th value; that is, I'll need to average the fifth and sixth numbers to find the median:

(10 + 11) ÷ 2 = 21 ÷ 2 = 10.5

The mode is the number repeated most often. This list has two values that are repeated three times.

The largest value is 13 and the smallest is 8, so the range is 13 – 8 = 5.

mean: 10.5
median: 10.5
modes: 10 and 11
range: 5

While unusual, it can happen that two of the averages (the mean and the median, in this case) will have the same value.

Note: Depending on your text or your instructor, the above data set may be viewed as having no mode (rather than two modes), since no single solitary number was repeated more often than any other. I've seen books that go either way; there doesn't seem to be a consensus on the "right" definition of "mode" in the above case. So if you're not certain how you should answer the "mode" part of the above example, ask your instructor before the next test.

About the only hard part of finding the mean, median, and mode is keeping straight which "average" is which. Just remember the following:

mean: regular meaning of "average"
median: middle value
mode: most often

(In the above, I've used the term "average" rather casually. The technical definition of "average" is the arithmetic mean: adding up the values and then dividing by the number of values. Since you're probably more familiar with the concept of "average" than with "measure of central tendency", I used the more comfortable term.)

A student has gotten the following grades on his tests: 87, 95, 76, and 88. He wants an 85 or better overall. What is the minimum grade he must get on the last test in order to achieve that average?
The unknown score is "x". Then the desired average is:

(87 + 95 + 76 + 88 + x) ÷ 5 = 85

Multiplying through by 5 and simplifying, I get:
87 + 95 + 76 + 88 + x = 425
346 + x = 425
x = 79

He needs to get at least a 79 on the last test.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #92 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466


Fat Tails View Post
You could also try something like the BrainTrend1, which is attached to the highest low from which it dedcuts a fraction of volatility, but uses the stochastics to identify trend changes.

@Fat Tails, Went looking for the BrainTrend1 on futures.io (formerly BMT). I'm getting better with search, but did not find it. Is it here? Thanks

Visit my NexusFi Trade Journal Reply With Quote
  #93 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466



Tiberius View Post
The median is the middle of a distribution: half the scores are above the median and half are below the median. The median is less sensitive to extreme scores than the mean and this makes it a better measure than the mean for highly skewed distributions. The median income is usually more informative than the mean income, for example.

The sum of the absolute deviations of each number from the median is lower than is the sum of absolute deviations from any other number. Click here for an example.

The mean, median, and mode are equal in symmetric distributions. The mean is typically higher than the median in positively skewed distributions and lower than the median in negatively skewed distributions, although this may not be the case in bimodal distributions. Click here for examples.

Computation of Median
When there is an odd number of numbers, the median is simply the middle number. For example, the median of 2, 4, and 7 is 4.

When there is an even number of numbers, the median is the mean of the two middle numbers. Thus, the median of the numbers 2, 4, 7, 12 is (4+7)/2 = 5.5.

-----------------------------------------------------------------------------------------------------------------------------------------------


Mean, Median, Mode, and Range

Mean, median, and mode are three kinds of "averages". There are many "averages" in statistics, but these are, I think, the three most common, and are certainly the three you are most likely to encounter in your pre-statistics courses, if the topic comes up at all.

The "mean" is the "average" you're used to, where you add up all the numbers and then divide by the number of numbers. The "median" is the "middle" value in the list of numbers. To find the median, your numbers have to be listed in numerical order, so you may have to rewrite your list first. The "mode" is the value that occurs most often. If no number is repeated, then there is no mode for the list.

The "range" is just the difference between the largest and smallest values.

Find the mean, median, mode, and range for the following list of values:
13, 18, 13, 14, 13, 16, 14, 21, 13

The mean is the usual average, so:

(13 + 18 + 13 + 14 + 13 + 16 + 14 + 21 + 13) ÷ 9 = 15

Note that the mean isn't a value from the original list. This is a common result. You should not assume that your mean will be one of your original numbers.

The median is the middle value, so I'll have to rewrite the list in order:

13, 13, 13, 13, 14, 14, 16, 18, 21

There are nine numbers in the list, so the middle one will be the (9 + 1) ÷ 2 = 10 ÷ 2 = 5th number:

13, 13, 13, 13, 14, 14, 16, 18, 21

So the median is 14. Copyright © Elizabeth Stapel 2004-2011 All Rights Reserved
The mode is the number that is repeated more often than any other, so 13 is the mode.

The largest value in the list is 21, and the smallest is 13, so the range is 21 – 13 = 8.

mean: 15
median: 14
mode: 13
range: 8

Note: The formula for the place to find the median is "( [the number of data points] + 1) ÷ 2", but you don't have to use this formula. You can just count in from both ends of the list until you meet in the middle, if you prefer. Either way will work.

Find the mean, median, mode, and range for the following list of values:
1, 2, 4, 7

The mean is the usual average: (1 + 2 + 4 + 7) ÷ 4 = 14 ÷ 4 = 3.5

The median is the middle number. In this example, the numbers are already listed in numerical order, so I don't have to rewrite the list. But there is no "middle" number, because there are an even number of numbers. In this case, the median is the mean (the usual average) of the middle two values: (2 + 4) ÷ 2 = 6 ÷ 2 = 3

The mode is the number that is repeated most often, but all the numbers appear only once. Then there is no mode.

The largest value is 7, the smallest is 1, and their difference is 6, so the range is 6.

mean: 3.5
median: 3
mode: none
range: 6

The list values were whole numbers, but the mean was a decimal value. Getting a decimal value for the mean (or for the median, if you have an even number of data points) is perfectly okay; don't round your answers to try to match the format of the other numbers.

Find the mean, median, mode, and range for the following list of values:
8, 9, 10, 10, 10, 11, 11, 11, 12, 13

The mean is the usual average:

(8 + 9 + 10 + 10 + 10 + 11 + 11 + 11 + 12 + 13) ÷ 10 = 105 ÷ 10 = 10.5

The median is the middle value. In a list of ten values, that will be the (10 + 1) ÷ 2 = 5.5th value; that is, I'll need to average the fifth and sixth numbers to find the median:

(10 + 11) ÷ 2 = 21 ÷ 2 = 10.5

The mode is the number repeated most often. This list has two values that are repeated three times.

The largest value is 13 and the smallest is 8, so the range is 13 – 8 = 5.

mean: 10.5
median: 10.5
modes: 10 and 11
range: 5

While unusual, it can happen that two of the averages (the mean and the median, in this case) will have the same value.

Note: Depending on your text or your instructor, the above data set may be viewed as having no mode (rather than two modes), since no single solitary number was repeated more often than any other. I've seen books that go either way; there doesn't seem to be a consensus on the "right" definition of "mode" in the above case. So if you're not certain how you should answer the "mode" part of the above example, ask your instructor before the next test.

About the only hard part of finding the mean, median, and mode is keeping straight which "average" is which. Just remember the following:

mean: regular meaning of "average"
median: middle value
mode: most often

(In the above, I've used the term "average" rather casually. The technical definition of "average" is the arithmetic mean: adding up the values and then dividing by the number of values. Since you're probably more familiar with the concept of "average" than with "measure of central tendency", I used the more comfortable term.)

A student has gotten the following grades on his tests: 87, 95, 76, and 88. He wants an 85 or better overall. What is the minimum grade he must get on the last test in order to achieve that average?
The unknown score is "x". Then the desired average is:

(87 + 95 + 76 + 88 + x) ÷ 5 = 85

Multiplying through by 5 and simplifying, I get:
87 + 95 + 76 + 88 + x = 425
346 + x = 425
x = 79

He needs to get at least a 79 on the last test.

Yeah, what he said!

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #94 (permalink)
 
Tiberius's Avatar
 Tiberius 
Coos County New Hampshire
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 1,552 since Feb 2010
Thanks Given: 2,984
Thanks Received: 3,406


rpm123 View Post
@Fat Tails, Went looking for the BrainTrend1 on futures.io (formerly BMT). I'm getting better with search, but did not find it. Is it here? Thanks

This is what I found on the net. Old stuff. The Strategy is for NT6.5. But if some one can read code. The indies are old meta indies.

Attached Files
Elite Membership required to download: BrainTrading71.0.zip
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #95 (permalink)
 
Tiberius's Avatar
 Tiberius 
Coos County New Hampshire
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 1,552 since Feb 2010
Thanks Given: 2,984
Thanks Received: 3,406

More BrainTrend

Attached Thumbnails
Click image for larger version

Name:	Wednesday.JPG
Views:	226
Size:	87.9 KB
ID:	41717  
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #96 (permalink)
 
Tiberius's Avatar
 Tiberius 
Coos County New Hampshire
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 1,552 since Feb 2010
Thanks Given: 2,984
Thanks Received: 3,406


Tiberius View Post
More BrainTrend

Loaded BrainTrend.cs into NT and compiled it.

Attached Thumbnails
Click image for larger version

Name:	Wednesday.JPG
Views:	214
Size:	152.4 KB
ID:	41719  
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #97 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

On a chart you have at least five different options to calculate a median. Let us for example take a lookback period of 7 bars.

(1) Take the seven bar high and the seven bar low and calculate (high + low)/2. This is a statistical 2-point-median.

(2) Median of the Closes: Take the seven closes and calculate a median from those seven closes. This is a statistical 7-point-median.

(3) Median of all the data points the bars contain: Take the seven opens, seven highs, seven lows and seven closes and calculate a statistical median from 28 data points.

(4) TPO - Median: Take every single tick from the seven bars and then calculate the median from all the single ticks (each tick can be observed up to seven times, depending on whether it is contained in one of the seven bars).

(5) Volume-weighted TPO Median: Proceed as under (4) but count each tick k times, if k is the volume of the bar it belongs to.

The medians (2) -> blue, (4) -> red and (5) -> green are shown in the chart below. The anaSuperTrend currently uses the Median(2), but it can easily be recoded to use (4) or (5) as well. Note that the median (5) deviates from the other medians. That can be explained by the fact that it is the only one that has a volume component.

Attached Thumbnails
Click image for larger version

Name:	Medians.jpg
Views:	181
Size:	79.4 KB
ID:	41720  
Reply With Quote
Thanked by:
  #98 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Tiberius View Post
More BrainTrend
Attached Thumbnails [IMG]https://nexusfi.com/attachments/41717d1308758409t[/IMG]
Attached Files BrainTrend.cs (10.7 KB, 0 views)

@ Tiberius: Don't waste your time with this BrainTrend indicator. It will not run correctly, but rather let explode your CPU.

Reply With Quote
Thanked by:
  #99 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466


Fat Tails View Post
@ Tiberius: Don't waste your time with those BrainTrend indicators. They are all flawed and will not run correctly, but rather let explode your CPU.

Now you tell us.

Visit my NexusFi Trade Journal Reply With Quote
  #100 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



rpm123 View Post
Now you tell us.

It has a second reverse OnBarUpdate coded within OnBarUpdate. This will increase CPU time by a factor 100 or 1000, depending on the chart lookback period, don't know. Try it out and put it on your chart, I am afraid to do so.

Reply With Quote
Thanked by:




Last Updated on July 15, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts