• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 11:20am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 11:20am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Random Walk (The unbeatable!) 354 replies

Is random really random? 231 replies

Probabilities in a Random Walk (Question about one CP's post) 35 replies

Random Walk Theory applying in Expert Advisor 336 replies

Price action pattern, and random thoughts 6 replies

  • Trading Discussion
  • /
  • Reply to Thread
  • Subscribe
  • 7
Attachments: Random walk and Pascals triangle
Exit Attachments
Tags: Random walk and Pascals triangle
Cancel

Random walk and Pascals triangle

  • Last Post
  •  
  • 1 Page 23 4
  • 1 Page 23 4
  •  
  • Post #21
  • Quote
  • Aug 4, 2010 6:04pm Aug 4, 2010 6:04pm
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting sqrt(-1)
Disliked
How will you be able to obtain P(stopped out) or P(take profit) without using historical data of walks for pinbars at a swing high? Mere deviation from a central price based on probabilities of random walks? I like the idea, but forex isn't random, it isn't like flipping a coin. GBP/USD has run up ~1500 pips from the low a few months ago. We can examine the random probability of it doing this, and the odds are very small by random (given p,q=50%), but as you know, historically the pair has moved this much and more in the past. This is how we know...
Ignored
In practice the probabilities are, more than anything, dependent on your entry rules/technique. So the only way to get statistics useful for risk assessment/management is from you own trading record.
Homeruns and capital preservation.
 
 
  • Post #22
  • Quote
  • Aug 4, 2010 6:33pm Aug 4, 2010 6:33pm
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting Scotty2Cues
Disliked
can you give some theory plz?
Ignored
Theory for which part? I thought that is just an application of pascal triangle, nothing new.
 
 
  • Post #23
  • Quote
  • Aug 4, 2010 7:08pm Aug 4, 2010 7:08pm
  •  sqrt(-1)
  • | Joined Jul 2010 | Status: The limit does not exist. | 67 Posts
Quoting medici
Disliked
In practice the probabilities are, more than anything, dependent on your entry rules/technique. So the only way to get statistics useful for risk assessment/management is from you own trading record.
Ignored
I agree, we can also apply back-tests to theoretical entries as well. For example, when an indicator reaches a certain level.
 
 
  • Post #24
  • Quote
  • Aug 5, 2010 4:01am Aug 5, 2010 4:01am
  •  Scotty2Cues
  • | Joined Mar 2010 | Status: Member | 247 Posts
Quoting ForexQuant
Disliked
Theory for which part? I thought that is just an application of pascal triangle, nothing new.
Ignored
How did you come up with the figures; did you count paths or something else? I couldnt come up with a formula and as Medici stated, Pascals triangle may not be the best route
 
 
  • Post #25
  • Quote
  • Aug 5, 2010 4:11am Aug 5, 2010 4:11am
  •  Scotty2Cues
  • | Joined Mar 2010 | Status: Member | 247 Posts
Quoting sqrt(-1)
Disliked
How will you be able to obtain P(stopped out) or P(take profit) without using historical data of walks for pinbars at a swing high? Mere deviation from a central price based on probabilities of random walks? I like the idea, but forex isn't random, it isn't like flipping a coin. GBP/USD has run up ~1500 pips from the low a few months ago. We can examine the random probability of it doing this, and the odds are very small by random (given p,q=50%), but as you know, historically the pair has moved this much and more in the past. This is how we know...
Ignored
I was going to get P(stopped out) or P(take profit) once I inputted the probabilities for a step to the left/right P(step right) = 1 - P(step left).

So if I got the direction of the trend correct P(step right) would not equal P(step left) and I was looking at how different values of SL/TP affects ev calculations. I was then going to include a move to breakeven after x amount of steps:

EV = -risk*P(Stopped out before moving SL to BE) + P(SL to BE after x steps)*P(TP)*reward

compared to not moving SL to BE:

EV = -risk*P(Stopped out) + reward*P(take profit)
 
 
  • Post #26
  • Quote
  • Aug 5, 2010 4:47am Aug 5, 2010 4:47am
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting Scotty2Cues
Disliked
How did you come up with the figures; did you count paths or something else? I couldnt come up with a formula and as Medici stated, Pascals triangle may not be the best route
Ignored
You can see the formula used by simply clicking on a cell or hit F2 to see the formula displayed in the cell.

I had a look at the spreadsheet and it simply calculates the proportion of all paths that end up at a certain level. It doesn't take the TP/SL into account, i.e. that some paths are not permissible, so the calculations don't seem related to your original question.
Homeruns and capital preservation.
 
 
  • Post #27
  • Quote
  • Aug 5, 2010 9:09am Aug 5, 2010 9:09am
  •  Scotty2Cues
  • | Joined Mar 2010 | Status: Member | 247 Posts
Quoting medici
Disliked
You can see the formula used by simply clicking on a cell or hit F2 to see the formula displayed in the cell.
Ignored
DOH!

Quoting medici
Disliked
I had a look at the spreadsheet and it simply calculates the proportion of all paths that end up at a certain level. It doesn't take the TP/SL into account, i.e. that some paths are not permissible, so the calculations don't seem related to your original question.
Ignored
Agreed. FQ has just used thae standard random walk model. So the method allows the SL to be hit more than once in n steps which is what I tried to avoid
 
 
  • Post #28
  • Quote
  • Aug 5, 2010 9:50am Aug 5, 2010 9:50am
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting medici
Disliked
You can see the formula used by simply clicking on a cell or hit F2 to see the formula displayed in the cell.

I had a look at the spreadsheet and it simply calculates the proportion of all paths that end up at a certain level. It doesn't take the TP/SL into account, i.e. that some paths are not permissible, so the calculations don't seem related to your original question.
Ignored
Which paths are not permissible? if you dont mind pls let me know.
 
 
  • Post #29
  • Quote
  • Aug 5, 2010 9:54am Aug 5, 2010 9:54am
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting ForexQuant
Disliked
Which paths are not permissible? if you dont mind pls let me know.
Ignored
For example, in a triangle of size 20, if the SL is -6, then the path that first goes -12 and then +8 ends up at -4 but has actually hit the -6 level before arriving at -4.
Homeruns and capital preservation.
 
 
  • Post #30
  • Quote
  • Aug 5, 2010 10:07am Aug 5, 2010 10:07am
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting Scotty2Cues
Disliked
DOH!



Agreed. FQ has just used thae standard random walk model. So the method allows the SL to be hit more than once in n steps which is what I tried to avoid
Ignored
I sum it up does not mean my method allow SL to be hit more than once. In fact the SL can be only hit once.

For example,

Event A: Hit TP at Step 1
Event B: Hit TP at Step 2
Event n: Hit TP at Step n

All those events are mutually exclusive. So P(A or B or n) = P(A) + P(B) + P(n)

I may not understand your question properly but the pascal triangle managed to solve a similar problem in one of the thread here. This solution is proven by 2 other members by using a monte carlo simulation and brute force simulation.
 
 
  • Post #31
  • Quote
  • Aug 5, 2010 10:14am Aug 5, 2010 10:14am
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting medici
Disliked
For example, in a triangle of size 20, if the SL is -6, then the path that first goes -12 and then +8 ends up at -4 but has actually hit the -6 level before arriving at -4.
Ignored
No, if the TP is +6 and SL is -2 then my excel sheet does not allow it to touch -12 or +8. Any path above TP and below SL are not taken into consideration.
 
 
  • Post #32
  • Quote
  • Aug 5, 2010 10:56am Aug 5, 2010 10:56am
  •  Scotty2Cues
  • | Joined Mar 2010 | Status: Member | 247 Posts
Quoting ForexQuant
Disliked
No, if the TP is +6 and SL is -2 then my excel sheet does not allow it to touch -12 or +8. Any path above TP and below SL are not taken into consideration.
Ignored
you have to do a new one each time you change sl/tp
 
 
  • Post #33
  • Quote
  • Aug 5, 2010 11:09am Aug 5, 2010 11:09am
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting ForexQuant
Disliked
No, if the TP is +6 and SL is -2 then my excel sheet does not allow it to touch -12 or +8. Any path above TP and below SL are not taken into consideration.
Ignored
Just had a closer look at your spreadsheet after solving the problem on my own and discovered that we ended up with the same solution!

So my earlier glance at your file was a bit too quick. Your spreadsheet does the trick. Apologies...
Homeruns and capital preservation.
 
 
  • Post #34
  • Quote
  • Aug 5, 2010 11:19am Aug 5, 2010 11:19am
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting Scotty2Cues
Disliked
you have to do a new one each time you change sl/tp
Ignored
just copy & paste. It is not a difficult job.
 
 
  • Post #35
  • Quote
  • Aug 5, 2010 11:20am Aug 5, 2010 11:20am
  •  ForexQuant
  • Joined Jan 2010 | Status: Member | 519 Posts
Quoting medici
Disliked
Just had a closer look at your spreadsheet after solving the problem on my own and discovered that we ended up with the same solution!

So my earlier glance at your file was a bit too quick. Your spreadsheet does the trick. Apologies...
Ignored
Apologies accepted.
 
 
  • Post #36
  • Quote
  • Aug 5, 2010 11:47am Aug 5, 2010 11:47am
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting Scotty2Cues
Disliked
you have to do a new one each time you change sl/tp
Ignored
Actually you don't. I modified the original spreadsheet to handle varying TPs and SLs as well as varying probabilities for an 'up' move.

The triangle is of size 8 only, for the sake of illustration. You get the probabilities of hitting SL/TP on the bottom line.

One could implement the same in VBA using objects and recursive functions, but I don't quite have the energy today.
Attached File(s)
File Type: xls Random walk and Pascals triangle R1 -modified.xls   24 KB | 234 downloads
Homeruns and capital preservation.
 
 
  • Post #37
  • Quote
  • Aug 5, 2010 11:52am Aug 5, 2010 11:52am
  •  Scotty2Cues
  • | Joined Mar 2010 | Status: Member | 247 Posts
Many thanks people!
 
 
  • Post #38
  • Quote
  • Aug 5, 2010 6:21pm Aug 5, 2010 6:21pm
  •  sqrt(-1)
  • | Joined Jul 2010 | Status: The limit does not exist. | 67 Posts
medici, if the initial condition is that the position moves "up", shouldn't step one be 100% for +1R, instead of 50%? Maybe I'm not understanding exactly what you're doing, but your excel spreadsheet is valid only for a trade where step 1 is "up", SL= -2R, and TP=+6R. A new one must be made or modified if SL/TP changes -right now, changing your TP to +7 means it would never be hit...but as we know there is one path after 8 iterations to achieve +7 and it is if there is no "down step", this would occur at step 7 and the probability is 0.5^7=0.0078=0.78%.

Note... If there confusion, try and think of a path where +7R is hit in 8 iterations or <7 iterations. You can't reach +7 with less than 7 steps, and 8 iterations would require a retrace, but then that gives you n-1 "up" steps and you would only reach +6, or if there is no retrace, you would achieve +8R, but the position would have been closed at +7.

Quote
Disliked
you have to do a new one each time you change sl/tp
 
 
  • Post #39
  • Quote
  • Aug 5, 2010 6:50pm Aug 5, 2010 6:50pm
  •  medici
  • Joined Nov 2008 | Status: Member | 3,069 Posts | Online Now
Quoting sqrt(-1)
Disliked
medici, if the initial condition is that the position moves "up", shouldn't step one be 100% for +1R, instead of 50%? Maybe I'm not understanding exactly what you're doing, but your excel spreadsheet is valid only for a trade where step 1 is "up", SL= -2R, and TP=+6R. A new one must be made or modified if SL/TP changes -right now, changing your TP to +7 means it would never be hit...but as we know there is one path after 8 iterations to achieve +7 and it is if there is no "down step", this would occur at step 7 and the probability is...
Ignored
Not sure I understand what you are trying to say. What do you mean by "initial condition" for example. And that the spreadsheet should be valid for 6/-2 only doesn't seem right, as it gives identical numbers as FQ's for 6/-6. Could you please clarify?
Homeruns and capital preservation.
 
 
  • Post #40
  • Quote
  • Aug 5, 2010 7:01pm Aug 5, 2010 7:01pm
  •  sqrt(-1)
  • | Joined Jul 2010 | Status: The limit does not exist. | 67 Posts
Quoting medici
Disliked
Not sure I understand what you are trying to say. What do you mean by "initial condition" for example. And that the spreadsheet should be valid for 6/-2 only doesn't seem right, as it gives identical numbers as FQ's for 6/-6. Could you please clarify?
Ignored
What I mean by initial condition is that your first move must be "up". That is, you open a position and then the first step (1) is to the left. Is that what you meant by...

Quote
Disliked
I modified the original spreadsheet to handle varying TPs and SLs as well as varying probabilities for an 'up' move.

...?

Otherwise, I'm unsure what your spreadsheet represents, could you please explain what you mean by that?

Probabilities should be the same for most, but think about this. If have a SL at -2R then there is less of a chance that the position may return to some arbitrary TP relative to a SL set at -5R. The position may run to -3R and back to your TP, that is one path that the condition where you're stopped out at SL=-2R doesn't have, and hence a greater probability should be accounted for.
 
 
  • Trading Discussion
  • /
  • Random walk and Pascals triangle
  • Reply to Thread
    • 1 Page 23 4
    • 1 Page 23 4
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023