Topic: Winning-Loosing Strategies Why?

Hi Too All
I have a general question
why is it, that we can easily create a MAJOR  loosing strategy yet making a winning strategy is sooo much harder?  the logic would dictate that if you have a losing strategy one should do just the reverse of what was done in order to have a winner!
... Do you have any thoughts or comments on this?

Re: Winning-Loosing Strategies Why?

I've found the reversal logic does not hold. There are a lot of trades that lose, doesn't matter if it was long or short. You can see this by flipping the signals -- the same trade loses both ways.

Re: Winning-Loosing Strategies Why?

that's  exactly what i mean, reversing strategy still makes it a losing strategy...
I am guessing  that if we can focus on the bi directional loosing entrees  and filter them out  we might have a better  chance at this  game.

Re: Winning-Loosing Strategies Why?

Yeah, reversing makes things just as bad, confirmed it many times.

But B, please speak up about your idea, explain, elaborate, make me believe lol Maybe we can work something out.

Re: Winning-Loosing Strategies Why?

This is my guess: One way to avoid it is to use limits and stops of the same size. This is difficult to do because either the spread makes the loss larger than the win, or the larger limit size (to offset the spread) reduces the win probability. If they are close enough, the expected probability is 50%; if the strategy has a win over 50%, it may suggest the strategy has caught some advantageous factor.

Another technique I do, I get an estimate of what percent of days are unwinnable are in my data set, then compare the percent caught in my strategy's trades. Usually, the proportion is equal, so I think I have not found out how filter them out yet.

Re: Winning-Loosing Strategies Why?

footon wrote:

Yeah, reversing makes things just as bad, confirmed it many times.

But B, please speak up about your idea, explain, elaborate, make me believe lol Maybe we can work something out.

hi  Footon
I don't have a clear idea of how to do this yet  this is why i posed the question,  sometimes things come together when different people  put some ideas and thought. so here are my thoughts:
I see the data as a line with peaks up and down , not much different than  a digital sound wave,  the white noise are the smaller, shorter  peaks and they likely will be bi-directional.  the amplitude is the force moving the peaks.  now the true signal would be  unidirectional of large amplitude or of slowly increasing prolonged amplitude .  assuming white noise is caused by random distribution  like entropy or diffusion effect , the irrelevant price motion should have similar effect   i suspect this will be specific   and different for each currency pair. knowing what that is can be used to subtract it from the "wave"  leaving a more clear signal.
what we have to work with on a chart are:  direction of movement, the size of the bar  (OCHL),  the volume,  and the resistance to movement , like the Ross Hook lines.  when you look on a chart  the hooks have tendency to aggregate  within a specific ranges , the bottom hooks  also often act like a spring board,  before the price penetrates the ceiling it will briefly and sharply penetrate the floor... like taking a deep breath b4 u sneeze  wink . also the longer the time the price bounces in range the longer the move likly to be ( this, the time that the price is range bounded, can be added to the list above) ... there might be some other factors that i had not considered...   I know this is not much and it might come to nothing and probably is not what you had  expected or hoped for,  i will keep working on it and keep adding to this site.  if you think of anything else feel free to add  smile
bwt Santa is watching so keep believing wink

Re: Winning-Loosing Strategies Why?

krog wrote:

This is my guess: One way to avoid it is to use limits and stops of the same size. This is difficult to do because either the spread makes the loss larger than the win, or the larger limit size (to offset the spread) reduces the win probability. If they are close enough, the expected probability is 50%; if the strategy has a win over 50%, it may suggest the strategy has caught some advantageous factor.

Another technique I do, I get an estimate of what percent of days are unwinnable are in my data set, then compare the percent caught in my strategy's trades. Usually, the proportion is equal, so I think I have not found out how filter them out yet.

Hi Krog
this has reminded me about a similar strategy i used  few years back on a demo that allowed hedging.
the assumption was this:  markets are range bound 80% of time and moves 20% of time,  I would try to determine the channel  range  (the more horizontal  the better.) and then  buy and sell a contract  in the middle  using ranges as limits (-10%)  ( looking at it now I was trying to utilize the "white noise" to my advantage) it worked really good for a while,  i would set the trade at night go to bed and in the  Moring both contracts would be closed at a limit.  i was working manually on this system  w/o sl  so eventually i blow my accounts. ..  i am sure there is a better way of doing this with sl,.. anyway, it's hard to find a good broker that will let you do hedging .
you also mention the 50/50 win strategy,  I don't think the high ratio is that critical,  I made a strategy that's only a 0.24 w/l ratio and  it is profitable under the right circumstances.  the basic premise was to lose a maximum of 1% of the account,  this allowed for the large # of losses however the wins must cover the losses and more.  It's very hard and frustrating  to watch  that system as it loses time and time again until it rides the wave. 
when you look at your 50/50 strategy  can you evaluate if the initial or the buildup volume could be the advantageous factor?  also how do you determine the % of days that are unwinnable in your data set?

Re: Winning-Loosing Strategies Why?

dr.B wrote:

hi  Footon
I don't have a clear idea of how to do this yet  this is why i posed the question,  sometimes things come together when different people  put some ideas and thought. so here are my thoughts...

Keywords here digital filters, cycle trading. I've worked with these ideas or indis, to be precise. If I remember correctly, there should be at least one digital filter coded for FSB, but the major work is done for MT4. A rather large variety of indis is available for MT4 I must say, in couple of them I saw great potential, but somehow I failed to put them into good use.

Have you worked with digital filters in MT? In case you haven't, I'll point you in the direction where I learned the most: http://www.forex-tsd.com/digital-filters/

sometimes things come together when different people  put some ideas and thought

Definitely agree on this one, ideas are so hard to come by, you know tongue

Re: Winning-Loosing Strategies Why?

footon wrote:

Have you worked with digital filters in MT? In case you haven't, I'll point you in the direction where I learned the most: http://www.forex-tsd.com/digital-filters/

Thanks for the link i will check it out

Re: Winning-Loosing Strategies Why?

dr.B wrote:

Hi Krog
this has reminded me about a similar strategy i used  few years back on a demo that allowed hedging.
the assumption was this:  markets are range bound 80% of time and moves 20% of time,  I would try to determine the channel  range  (the more horizontal  the better.) and then  buy and sell a contract  in the middle  using ranges as limits (-10%)  ( looking at it now I was trying to utilize the "white noise" to my advantage) it worked really good for a while,  i would set the trade at night go to bed and in the  Moring both contracts would be closed at a limit.  i was working manually on this system  w/o sl  so eventually i blow my accounts. ..  i am sure there is a better way of doing this with sl,.. anyway, it's hard to find a good broker that will let you do hedging .
you also mention the 50/50 win strategy,  I don't think the high ratio is that critical,  I made a strategy that's only a 0.24 w/l ratio and  it is profitable under the right circumstances.  the basic premise was to lose a maximum of 1% of the account,  this allowed for the large # of losses however the wins must cover the losses and more.  It's very hard and frustrating  to watch  that system as it loses time and time again until it rides the wave. 
when you look at your 50/50 strategy  can you evaluate if the initial or the buildup volume could be the advantageous factor?  also how do you determine the % of days that are unwinnable in your data set?

This is my guess: The range is the unwinnable trade, but with a large stop and small limit, it inverts the unwinnable to unlosable, they get really high win rates like 90% or higher, because long or short does not matter, the price varies up and down by the limit amount before the stop amount, so it wins either way. Unfortunately, now instead of trying to get a system that enters long or short correctly, it is a system that must choose between a ranging approach and a trending approach; still the same problem of trying to predict the future.

I agree, the win rate is not so important, in theory it is how much larger the win rate is over the breakeven rate, to generate profitability.

Re: Winning-Loosing Strategies Why?

krog wrote:

This is my guess: The range is the unwinnable trade, but with a large stop and small limit, it inverts the unwinnable to unlosable, they get really high win rates like 90% or higher, because long or short does not matter, the price varies up and down by the limit amount before the stop amount, so it wins either way. Unfortunately, now instead of trying to get a system that enters long or short correctly, it is a system that must choose between a ranging approach and a trending approach; still the same problem of trying to predict the future.

Ok... turtles used a 20day envelope; they would enter long at  the upper envelope +1pip and short on reverse with stop loss of 1% portfolio, the order size was dependent on the volatility ( have a write-up on that trade if u like i can forward it to you) ... can we use the 20D envelopes as our range ?.  our long entry could be 1% Account value (order size dependent) above the lower border w/ sl at lower 20d border +1pp,  with a soft target of 1.5 STD and a trailing stop after. this could possibly be further defined as ;  the initial  long entry would  only be created  after: at first a new (higher)  upper envelope was created that was followed by a new (Higher) lower envelope creation, subsequent orders would be allowed to bounce between envelopes until a breach...
the 20D delay might  be bit too long in this market, a shorter time frame like 1H or 15M might give us longer periods when price is range bound

this approach would allow price action to determine the direction of trade...( I am not too good at predicting the future, from my personal experience  I see the future opposite to what it actually becomes... wink lol )

Re: Winning-Loosing Strategies Why?

Do you have a way to test it, or have you made the strategy in FSB? Then, you could get results that would show either it's disproved, or not disproved. I don't know or have comments for the strategy, I go with the philosophy that I whatever I think is not so important, but whatever can be tested and conclusions drawn from the testing are the ideas to go with. I've had a lot of personal experience the same as yours.

Re: Winning-Loosing Strategies Why?

krog wrote:

Do you have a way to test it, or have you made the strategy in FSB? Then, you could get results that would show either it's disproved, or not disproved. I don't know or have comments for the strategy, I go with the philosophy that I whatever I think is not so important, but whatever can be tested and conclusions drawn from the testing are the ideas to go with. I've had a lot of personal experience the same as yours.

not yet, the  list of current indicators does not include one that i can use for this purpose. I will write one within few weeks... it's in the pipeline wink. at present i am working on a simpler project i call it the pull back..., i just learned how to use the if, else and while  commands.  my goal is to have the first working screener out b4 end of the year smile
talking on the subject of programming  what i find  puzzling is the use of iBar, Bars, iFirstBar ; are they reserved words? what is the difference between them?,  if i specify  {int iBar=4;}, does it mean that the newest Bar (the one that is forming) is the 4th Bar or is it the last complete bar and the bar that's being formed is the (iBar+1) ? Or do i have it all wrong?..  I also see that some indicators declare iFirstBar  others don't  what is it function and how is iFirstBar different from  Declaring iBar?  sorry lots of Questions

Re: Winning-Loosing Strategies Why?

Bars = total number of bars in your data set; or, open your csv, how many lines of data is the number of bars; also, in the upper left box "Market Statistics", it has "Number of Bars".

iBar = the indicator loops through all the bars in your data set, and iBar is the bar it is currently on; or, imagine the csv, it starts from the first line, and goes line by line to the end, and iBar is what line it is on. Be sure iBar never gets increased to Bars value, or you will get "Index Out of Range" Error; maximum should be Bars-1 because the array is 0-indexed. When you mouse over the chart, in upper right it will have "Bar Number", it is the same as iBar+1 because the array is 0-indexed.

iFirstBar -- to be sure there are enough previous bars for your indicator's calculation, from the period parameter. Ex, if period = 20, needs at least 20 previous bars, so iFirstBar should start at bar 21 or higher. If it starts at bar 3, then you will probably get "Index Out of Range" Error. Usually, they are set as:
int iFirstBar = iPeriod + 1;
it could be + 1, or + 2, just so long as iFirstBar is greater then the number of bars needed for the calculation. Sometimes it's good to add 10 to be sure; skipping the first 10 bars out of 10k or 20k bars won't make much difference. Use iFirstBar to set the starting instead of iBar because it makes it easier to debug if things don't work. Not declaring iFirstBar may be a shortcut, but if it doesn't work you will probably spend more time trying to figure out where the problem is.

int iBar = 4 -- iBar will be the 5th bar of your data set  (it is in an array which is 0-indexed, so first bar is 0, second bar is 1, etc). Since iBar is increasing to move through the array from the for() statement, usually it's better not to set it to a specific value.

iBar: Mr Popov's style is to use a lower case letter in front of the variable name to note what type it is.
iBar -- "i" is for int
dValue -- "d" is for double
adEOMC -- "ad" is for an array of double values
sPeriod -- "s" is for string

Re: Winning-Loosing Strategies Why?

Thanks Krog  that is very helpful  smile

Re: Winning-Loosing Strategies Why?

hi Krog
once again i will need your help
I have run into a problem i don't know how to solve. I  first made this filter that simply looks at  last  'X' bars and if it's close is lowest it buys if it's highest it sells. that worked fine than i added a new component the 'Y' factor wink ...  it corresponds to the length of the initial bars where they all are in same direction.  it all works fine as long as the Y <=  X  if it's not it crashes. I tried to set the if (iPeriodX <= iPeriodY) iPeriodX = iPeriodY+1; but that did not work.. any sugestions?
Thanks

I am attaching the file

Re: Winning-Loosing Strategies Why?

dr.B wrote:

I am attaching the file

i don't see the attached file.... is the system still not working?

Re: Winning-Loosing Strategies Why?

dr.B wrote:
dr.B wrote:

I am attaching the file

i don't see the attached file.... is the system still not working?

Not working, hopefully it will get fixed in February.

Try this for uploading - http://forexsb.com/forum/_extend/index. … load/index

Do you get index out of bounds error too?

Re: Winning-Loosing Strategies Why?

Hi dr.B, footon,
Should we move this to the Developers Forum? These are really good issues in coding indicators, hopefully it might solve a similar problem for another user, get them over the first steps.

For crashes, I think you mean you get "Index Out of Range" error? If this is the case, then most likely you have iFirstBar set to X only. If Y is less than X, it will be protected from going back to [iBar-Y] = -1; if Y is greater than X, then when it loops backwards past 0, it will throw the error.
Try this:
int iFirstBar = Math.Max(X, Y);
then it will be the higher one, it will protect against going past 0.
Or if you use X and Y together to go backwards from iBar:
int iFirstBar = X + Y;

Or does it run, then fade out, and the title bar says "Forex Strategy Builder (Not Responding)"? In this case, you probably have a "for" loop or "while" loop, but the integer is not increasing.

I'd recommend (but this is only my opinion) splitting into 2 indicators, and use them together. it is simpler if it only measures one thing, here it sounds like measuring highest/lowest, and bar range, which are 2 things. I've written a couple of 2-in-1 indicators, but then I can't decide how to do the Logics because the possible logic combos get large, and when there is a bug, it is more difficult to find.

Re: Winning-Loosing Strategies Why?

Hi  Krog , Footon
Merry Christmas to all! (or just happy holidays if that's your preference smile )
I have remembered  what u said about the " Index Out of Range"  error , i did  have  some buffer for the  iFirstBar so i didn't get that error ( i like the iFirstBar = Math.Max(X,Y) command i haven't seen that b4 )  in my case, the program would just freeze and i had to cancel the process in order to stop  it.  so i think your second assumption is more likely , an infinite loop.
splitting this filter into two  is an option but they seem right together ... this gives me some ideas
Thanks
Ps  I have no problem moving this to the Developers Forum,  good Idea smile

Re: Winning-Loosing Strategies Why?

I just tried to do  this,
if i set
int iPeriodX  = Math.Max(IndParam.NumParam[0].Value, IndParam.NumParam[1].Value);
and
int iPeriodY  = Math.Min(IndParam.NumParam[0].Value, IndParam.NumParam[1].Value);
and when x=y
if (IndParam.NumParam[0].Value == IndParam.NumParam[1].Value)
                {  iPeriodX = (int)IndParam.NumParam[0].Value;
                   iPeriodY = (int)IndParam.NumParam[1].Value;
                }
seems to me that this could solve the problem , however i get " The name 'Math' does not exist in the current context"
I assume that i need to declare Math as a class in a Library
how do i do it? ' using Math; '? that didn't work....

Re: Winning-Loosing Strategies Why?

I got it smile!!!!

I added
     using System;
to the beginning above
    using System.Drawing;

than the Math. class was defined
after that I added :

      int iPeriodX = (int) Math.Max(IndParam.NumParam[0].Value, IndParam.NumParam[1].Value);
      int iPeriodY = (int) Math.Min(IndParam.NumParam[0].Value, IndParam.NumParam[1].Value);

      if (IndParam.NumParam[0].Value == IndParam.NumParam[1].Value)
                {  iPeriodX = (int)IndParam.NumParam[0].Value;
                   iPeriodY = (int)IndParam.NumParam[1].Value;
                }
and

    int iFirstBar = (int)  Math.Max(IndParam.NumParam[0].Value, IndParam.NumParam[1].Value);

ok almost got it  shows ambiguous when X=Y... that's a mistake somewhere in the code
lol  but i am closer
I feel  like a kid in a candy store 
thanks guys for your help smile

Re: Winning-Loosing Strategies Why?

Glad that worked out.
Shows ambiguous -- this happens when the indicator gives a Buy and Sell in the same bar. There are a few cases where this happens, I've found sometimes it makes sense. I've found for my indicators that look for a "higher high" or "lower low", this could happen if the current bar is much taller, like breaking out of a narrow sideways range. Then, the same bar would be making a new high and new low at the same time. I find these a lot for example after NY closes and as Australia opens.

Re: Winning-Loosing Strategies Why?

dr.B wrote:

Hi  Krog , Footon
Merry Christmas to all! (or just happy holidays if that's your preference smile )
I have remembered  what u said about the " Index Out of Range"  error , i did  have  some buffer for the  iFirstBar so i didn't get that error ( i like the iFirstBar = Math.Max(X,Y) command i haven't seen that b4 )  in my case, the program would just freeze and i had to cancel the process in order to stop  it.  so i think your second assumption is more likely , an infinite loop.
splitting this filter into two  is an option but they seem right together ... this gives me some ideas
Thanks
Ps  I have no problem moving this to the Developers Forum,  good Idea smile

To find where the infinite loop is, I comment out all the lines (/*   */) in the main for-loop and run, then uncomment 1-2 lines at a time and run until it blanks out again.

Re: Winning-Loosing Strategies Why?

Paul75 wrote:

I just want to say in forex trading reverse strategies do not work. And making loosing strategies very easy because spending money is easy than earning money.

Hi Paul75

so what is your solution?  what works for you?