Sunday, 26 April 2009

FOREX ; Statistical Trading � Getting the edge

Statistical Trading consists of using statistical tools on historical price data in order to improve trading returns. The idea behind statistical trading is that if a trader can find even a slight statistical edge, then the expected return over a large number of trades will be positive.
I'm talking about the same kind of edge that a casino owner or an insurance company has. This is a statistical edge based on the law of large numbers. The casino doesn't know if a particular spin of the roulette wheel will be a win or a loss, but they know that after 1000 spins they will very likely be richer. Their edge is simple to describe using the game of roulette as an example. The player has a 1/38 chance of winning on any given spin, but will only receive 36 times their money if they win. So for 3,800 spins, the player will win 100 of them on average, yielding $3,600. But the player will lose the other 3,700 spins at a dollar each for a loss of $3,700. So what's the average take for the house? It's $100 for every 3800 spins, or a little under 3 cents per spin. It adds up...and all other casino games of pure chance (these don't include poker or blackjack which can involve some skill) are variations on this theme. That's why casinos get rich and gamblers go broke.
Insurance companies get rich in pretty much the same way. The company has no idea if a particular person will die this year, but they do have a pretty accurate idea how many people out of 1,000,000 policyholders with a given profile will die this year. Let's say that statistically the death rate of a given class of people (males over 55, smokers, and in moderate health for instance) is 4% so that we expect 40,000 to die this year. If each policy pays $10,000 for a death, then the company expects to shell out $400 million dollars in benefits...wow! So how much should the company charge in premiums for those one million policies each year then? Well how about $500 each? That gives the company $500 million in revenues for an expected $400 million benefit payout, leaving $100 million for salaries, expenses, profits and whatever. That's their statistical edge.
Now let's look at some ways that we can use this idea of a "statistical edge" in trading.
A very common way that traders try to apply the ideas of statistics is by planning trades in such a way that the potential gain exceeds the potential loss. This is the classic "cut losses short and let profits run" argument. For instance if you set up a trade so that you lose only $100 if you're wrong but gain $300 if you're right, then you only have to be right 1/4 of the time to break even. That's because for every four trades (on average) you would lose $100 three times and gain $300 one time, which is a wash (not counting commissions). And any numbskull can be right more than a quarter of the time right?
Right. Sure. So why aren't we all rich? After trading currencies for a while in 2004, I figured out what the problem was. A tight stop and a wide target will tend to make you wrong a lot simply because it's easier for the stop to get hit. On the other extreme, suppose
suppose you decide that you like to have a lot of winning trades, so you place very wide stops and very close price targets. Fine, now you'll win a lot of the time but the amounts will be small. And one loss, although uncommon, will tend to wipe out many little wins. So no matter where you are on the "trading setup" spectrum, wide stops and tight targets, tight stops and wide targets, or any combination in between, statistically it ends up being a wash. There is no intrinsic "edge" in any given trading setup scheme, including "cutting losses short and letting profits run." Heresy, I know.
Getting a real statistical edge requires that you can identify situations in which the price tends to move in such a way that you can set up trades which have a positive expected return. Expected return is just the percentage of wins multiplied by the win amount, minus the percentage of losses multiplied by the loss amount. An example will make this clearer.
Suppose you know that every time the USD/JPY rate crosses above its 20 day moving average, the price tends to move up more often than it moves down. Investigating this in more detail using historical data, you determine that there is a 40% probability that the price rises by 25 pips before it ever drops by 10 pips. Now even though this only happens less than half the time, it still allows you to set up trades with a positive expected return. This is because if you set your target at 25 pips and your stop at 10 pips, you will win 25 pips 40% of the time and lose only 10 pips during the other 60% of the time. The expected return is:

(40% x 25 pips) - (60% x 10 pips) = 10 pips - 6 pips = 4 pips

So on the average, you can expect to get 4 pips per trade using this strategy, even though you lose most of the time! But remember that this whole example is predicated on the knowledge that a positive crossover of the 20 day moving average tends to skew the expected return in your favor. That's your edge in this example.

---- SBY ----- by. Scott Percival ---------
Read more ...

Indicator DigitalFilterTF


Author:

??????? ??????? Dmitry Yakovlev

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

Library DF.dll to calculate the parameters of the filter:
copyright "Copyright (c) 2005, Sergey Iljukhin, Novosibirsk"
mailto: sergey@tibet.ru



Description:

Universal digital filter, the filter parameters are set. (FATL,SATL,RFTL,RSTL ? ? ?) (FATL, SATL, RFTL, RSTL etc.)
Sense - for example, 5,15,30 a moment,e you will see one picture calculated for TF


Library DF.dll placed in \ * trader \ experts \ libraries \

Attention! To require three additional DLL
containing a block of mathematical processing - bdsp.dll, lapack.dll, mkl_support.dll,
which must be installed in C: \ Windows \ System32 \ or near DF.dll in \ experts \ libraries \

Before using, make sure:

1. 1. items that you "Allow DLL import" and "Confirm DLL function's call" in your Options-> Expert Advisors
2. 2. What's in the directory C: \ Windows \ System32 \ there Bdsp.dll, lapack.dll, mkl_support.dll - supporting mathematics library.
The archive DLLS.ZIP

Parameters (Dmitry Yakovlev):

tf - timeframe in minutes ... 240 = H4, 60 = H1 240 = H4, 60 = H1
Price 0-cl ,1-op ,2-hi ,3-lo
Preset 0-User ,1-FATL ,2-SATL ,3-RFTL ,4-RSTL

Description of input parameters for DF.dll (Sergey Iljukhin, Novosibirsk):


Ftype - Filter Type: 0 - LPF (FATL / SATL / KGLP), 1 - HPF (KGHP),
2 - band (RBCI / KGBP), 3 - regectory (KGBS)
P1 - Period cutoff P1, bar
D1 - Period cutoff transition D1, bar
A1 - Attenuation in the late A1, dB
P2 - Period cutoff P2, bar
D2 - Period cutoff transition D2, bar
A2 - Attenuation in the late �2 dB
Ripple - beats in bandwidth, dB
Delay - Delay, bar

For the LPF and HPF settings P2, D2, A2 ignored
Conditions:
LPF: P1> D1
HPF: P1
Band and regectory: D2> P2> P1> D1



2 filter FATL, SATL tf = 60 TF= 5 minutes

Forex Indicator

2 filter FATL, SATL tf = 60 TF=15 minutes

Forex Indicator

Download forex indicator DigitalFilterTF

Dll Archive Library Download

Download DF.dll

Read more ...

Info + Ticks


Author:

Dmitri Yakovlev (Info)
Rosh (Ticks)

Description:

Easy Forex - Ticks indicator of Rosh crossed to the forex indicator Info.
Primarily to calculate the size of the lot, depending on the percent of risk, taking into account the changing situation.
Also, dynamically calculates the take-profit and stop-loss if they do not tell (if = 0)
The size of the lot is calculated based on the stop-loss of deposit and current opportunities.
For example deposit $ 1000, when the transaction you may risk losing 10% - ie 100 = $
Lot size will be calculated on the assumption that, if it will work to stop, it will lose $ 100 (10%)

PARAMETERS:

Options Ticks:
MaxDrawTicks = 500;

Options Info:
Text Color:
cColor=Green; cColor = Green;
For the calculation of the lot:
mini_forex = 0, 1 - mini forex - lots of 0.01
period = 300; minute period for the calculation of stop and take profit if they are not
RiskPercent = 25% of the free margins of which are ready to risk
TP = 0; take a profit - if 0 - then the calculation program
SL = 0; freeze - If 0 then calculation software

A calculation of High and Low for the period from now and for the period
SL is installed in the High-Low
TP = SL / 2

Information on the schedule:
TakeProfit: items
StopLoss: items
FreeMargin: $
RiskPercent:% risk (the amount of $)

lot N% risk: the lot to open in the light of a given risk
lot 100% risk: the lot at 100% risk
mediums hi-lo: the average value of hi / lo for the period
media op-cl: the average opening / closing for the period

with mini_forex = 0

?????????? ??????


When mini_forex = 1

Forex Indicators

Download forex indicator Info + Ticks
Read more ...

Line deviations from the original price given


This forex-line indicator shows the indentation of the originally specified price at a point of time, with a given step

? extern bool Fixed = false; - (true - istolzuet recording of the hour / false - away from the current time
extern int HourPrd = 1; - during the time
int LineCount = 10 - number of lines
extern int LineFirst = 10 - indent the first line
extern int LineStep = 5 - a step away from the first line
extern color OpenColor = Yellow; - the color of the price discovery
extern color FirstColor = Red; - the color of the first line
extern color NextColor = SpringGreen; - the color of the following lines

Forex Indicators



Download forex indicator - Line price deviations from the original set
Read more ...

Friday, 24 April 2009

Indicator ZZ


Forex Indicator

Forex - indicator ZZ - version zigzag retarded rate is calculated as the ratio of the volatility of the bars.

In the code, there are three options for [the two commented out] - HL all the bars, the mean arithmetic and quadratic between HL and all the latest sBars bars. If you want to invent a:)

Big options are described in the code, just in case duplicate.

extern double extHL = 5 / / coefficient for the average HL, defining the path at points where the peak is considered to be established
extern int extFlat = 48 / / number of bars fleta when the peak draw force
extern int sBars = 480; // show bars extern int sBars = 480; / / show bars


Download forex indicator ZZ

Read more ...

Indicator ZZ


Forex Indicator
Forex - indicator ZZ - version zigzag retarded rate is calculated as the ratio of the volatility of the bars.
In the code, there are three options for [the two commented out] - HL all the bars, the mean arithmetic and quadratic between HL and all the latest sBars bars. If you want to invent a:)
Big options are described in the code, just in case duplicate.
extern double extHL = 5 / / coefficient for the average HL, defining the path at points where the peak is considered to be established
extern int extFlat = 48 / / number of bars fleta when the peak draw force
extern int sBars = 480; // show bars extern int sBars = 480; / / show bars


Download forex indicator ZZ
Read more ...

MA from the digital filter, low


Forex - indicator - moving average (MA) of the digital filter bass.

The indicator used to determine the turning points in the trend of historical data (the arrow up, down).

Odds are the program of Digital Filter Methods.

LPF cut-off periods ranging from 4 to 60 years.



Download forex indicator MA from the digital filter, low
Read more ...

Tuesday, 21 April 2009

Indicator ytg_TF_RSI


Forex - the indicator shows the importance of RSI, time schedule of values which are the indicator changes color when above or below the level of 50, and the arrow shows the direction indicator.

The indicator is written to test the strategy described in the forum KROUFR, the strategy is based on the Fibonacci levels.

Forex Indicators

Forex Indicators

Download forex-indicator ytg_TF_RSI
Read more ...

Indicator Fractals_Price

Forex - an indicator of price levels of fractals.

Forex Indicators

Forex Indicators

Download forex indicator Fractals_Price

Read more ...

Indicator Gepa smoothed on the basis of ADX


Forex Indicators


Setting this forex indicator:

For different periods of different WinSize

M1 - 8-14

M5 - 5-10

M15 - 3-8

EMAPrd - smoothing, markirovalnoe value specified for smoothing 21

? clearer picture, he gives the M5 as a filter for the traffic

Direction of movement is determined by:

or via the red line is less than zero recession more - the rise ..

or through the green and dark - green growth, dark recession ..

Forex Indicators

Download forex indicator Gepa on a smoothed ADX
Read more ...