Vrothdar's Journal

Thing is, EMA's are weighted on time, so the current day is the most significant, then the previous day, then the day after that. By 50 days ago the influence is actually tiny. That's probably what's happened.

Pity, though, I really liked the voting :(

The EMAs decide the direction. The voting is weighted on the performance over the last 50 bars measured bar by bar in pips. The weighting of the EMA shouldn't have an effect on that.
 
Interestingly I am also taking a tangent looking into a few voting ideas with indictors. I think that if you can understand the indicators enough then find some way to factor the weight they should have in the current market decision it could really lead somewhere.

The way I've done it with these tests is for each bar worked out the pip gain from open to close based on the direction the EMA said I should go at open. For each EMA I total the pips lost and pips gained then do a total of all 4. I then work out what percentage of pips lost each EMA accounted for and subtract it from the percentage of pips gained to give it a voting weight. This can be positive or negative depending on how well it's performing which (should) mean that it could use several crappy indicators to make decent trades. All that is based on the previous 50 bars.

At each bar it then adds up votes for short and votes for long and goes with whichever had a higher value.
 
Last edited:
Interesting. I like the idea of giving the weight to each indicator based on some recent performance will ruminate over that idea for a while.

It sounds like a lot of manual work in excel to me though.
 
It wasn't too bad. Took me about 20mins to set it up for 4 EMA crossovers which I can adjust the settings of by simply changing values in a cell in the header for each EMA. I can do the same for the period performance is measured over as well.

Currently it's not using any stops. Will start considering those when I can figure out why my error changes the results so much.

I think I've worked out why some pairs need the direction of the votes to be flipped - The weights for the votes consider gains and losses separately so an indicator could contribute a high percentage to the pips gained but a smaller percentage to the pips lost which gives it a positive vote (ie the system will do as it says rather than doing the opposite like it does for negative votes) however it could still be losing pips.

I need to sort that out a bit which should mean it never needs to be flipped. First thing I'll try is working out the absolute difference (rather than just percent of pips gained - percent of pips lost) and then make it positive if it's been winning and negative if it's been losing.
 
Well changing around the way the weights are worked out hasn't had as much of an effect as I'd hoped: GBP/USD (the only pair I have data for at work) still needs to be flipped when I put the error in. Really thought the change in weighting calculation would have sorted that. Still, this new weighting is a little better anyway but not by as much as I'd expected.

I tried messing about with the settings of the EMA crossovers and it doesn't have much of an effect at all, which is good.

A bit of digging finally got to the bottom of my error - going to double and tripple check it but it looks like it wasn't an error at all. Will put a post together, probably at lunch, detailing why I thought there was an error, and why there wasn't.

This is hugely promising.
 
2ezttu0.png


Hopefully the above image makes sense to you all. In short: When my "error" is applied the system takes the correct vote but gives it a weight at the close of that bar rather than the weight it would have at the open.

When my "error" is not applied the system takes the vote from the bar before but gives it the correct weight for the present bar.

I'm going to update the total pips and pips gained/lost over the last X bars to correct the problem with weights.

:edit:

After correcting the weight calculation it turns out that the performance gain was caused by using the wrong weight rather than the wrong vote. Still can't get my head around why it's making such a big difference though.
 
Last edited:
I've worked it out...woot! When at bar X the vote is assigned the weight of bar X close instead of bar X open (ie my error) it'll get into and out of trades a bar sooner. That's the only difference between the trades that are placed. The trades on the left are the correct ones and the right are the erroneous ones.

rjqdqs.png


Any suggestions as to how I can get signals to go off a bar sooner? I guess I need to do TA on the votes with a leading indicator...not sure how well that'd work though.

Maybe it'd work better on a shorter time frame where the one bar difference shouldn't have so much of an effect?
 
Glad you've found it - not sure I can help as I haven't had time to really understand what you are doing in detail.

Does remind me of a time when I thought I had really, really found the answer only trouble was I needed to know the day's close in advance! Took about an hour before I realised what I had really done and came crashing back to earth.
 
That's pretty much what's happened here. I'm kind of doing technically analysing 4 different technical analyses of the price. I think I need to technically analyse that if I've any chance of making this work as is....

Below is a plot of the values of long and short votes over the 100 most recent bars in my data. I'm going to try extrapolating the weight of the vote by one bar each day as by the looks of things that should make the crossover occur earlier by one bar. Might get a few more dodgey signals but we'll see.

2jeczli.png


Tried extrapolating but that just increased the size of each movement rather than causing the crossovers earlier so it basically generated a load of extra crossovers without moving the ones I already had to the right place.
 
Last edited:
Well changing around the way the weights are worked out hasn't had as much of an effect as I'd hoped: GBP/USD (the only pair I have data for at work) still needs to be flipped when I put the error in. Really thought the change in weighting calculation would have sorted that. Still, this new weighting is a little better anyway but not by as much as I'd expected.

Don't fret too much about having to invert the whole thing. As long as it's consistent, it's all good. My current approach is based on flipping a trend-follower on its head, for example...
 
That in itself doesn't bother me too much but having to flip it for some pairs and not others bothers me. Not because it doesn't work but because I don't understand why. It's also really, really doing my nut trying to work out how to predict crossovers of my votes a day earlier than they occur.

I'm sure driving around the M25 and up the M4 to Cirencester later will help...
 
That in itself doesn't bother me too much but having to flip it for some pairs and not others bothers me. Not because it doesn't work but because I don't understand why. It's also really, really doing my nut trying to work out how to predict crossovers of my votes a day earlier than they occur.

I'm sure driving around the M25 and up the M4 to Cirencester later will help...

My advice at this point would be to try other indicators and strategies, see how they perform. There's a good chance you'll find some insight during the process, is mostly what I mean.

Have fun with the M25... or something...
 
As I (eventually...damn forums) posted in the forex mech system thread; I think I've had a brainwave...use minute bars...thousands of them. Hopefully that'll cause the crossovers (of votes) to happen in a much smoother fashion because the period the calculations are based on is being moved along a minute at a time rather than 24hours at a time. I doubt it'll be as good as entering and exiting 24 hours sooner because I expect more fake outs around crossovers but I'm hoping it'll get in and out much more promptly.

The other idea is to mix up the systems it analyses. Rather than 4 different EMAs I'm going to try 2 EMAs with, most probably, RSI and stochs. Hopefully a bit more diversity there will reduce the lag.

The idea was always to have it analysing as many (simple) trading systems as possible but I'm limited by the power of my PC at the moment. Trying the minute bars using just 4 will bring my PC to it's knees - Currently 8000+ day bars is a pain. 8640 minute bars is 7 days:confused:

I'm going to keep pushing on with this idea though. I'm confident I've got something very good here, that could be applied to any market, if I can just get it to fine tune it's entries and exits a little better.

I'd be pleased with 10 pips a day over all currencies. Being so close to doing that on each pair is just too good for me to give up on right now.
 
As I'm going to Reading festival on Thursday I'm going to take it easy for the rest of the week. Just to satisfy my curiosity; I'm going to try 2 x EMA, aroon and one other easy to setup indicator to see how extra diversity on that front changes my results. When I get back my copy of excel 2007 should be here to get me one step closer to trying my system on minute bars over a daily time frame.

By the end of the month I want to have my system written in VBA in such a way that I can select an indicator from a dropdown menu, set the appropriate parameters, repeat until I've got all the indicators I want and then get my code to do the rest for me while I go do something more fun.

Hopefully I can get my code efficient enough for minute bars to be fairly easy to run.

Assuming that the results of these tests are roughly as I'm expecting I'll then spend time coding up many, many more indicators and investigating why it sometimes needs to be flipped. No matter how promising my results look there's no way I'm taking this live unless I fully understand why my system works and have appropriate tests and measures I can use to differentiate expected, temporary, poor performance from system failure.
 
Due to a completely unexpected event I'm currently struggling with a rather horrible mind f***. I've been spending pretty much all my mental energy on dealing with it and as such none of what I'd said I'd like to achieve in the previous post has been achieved.

As these sorts of things could happen at any time I'm using this post as a marker to help me, at a later date, reflect on the effects of said mind f*** and (hopefully) learn enough from it to allow me to form a plan that will help me minimise the effects of this kind of thing on my real trading in the future.
 
Sorry to hear about said mind ****. Hope you clear it up soon.
 
Due to a completely unexpected event I'm currently struggling with a rather horrible mind f***. I've been spending pretty much all my mental energy on dealing with it and as such none of what I'd said I'd like to achieve in the previous post has been achieved.

As these sorts of things could happen at any time I'm using this post as a marker to help me, at a later date, reflect on the effects of said mind f*** and (hopefully) learn enough from it to allow me to form a plan that will help me minimise the effects of this kind of thing on my real trading in the future.

Ouch, sympathy.

I tried trading by hand again, for which I'm blaming my fever. Need to stop doing this long enough to patch my account together in time to actually get my auto-trader live later in the year. That's my screwup for the week, anyway.
 
Thanks for the sympathy guys. Wasn't out looking for it but it's still very appreciated.

Hope your manual trading wasn't too expensive a screw up!
 
Thanks for the sympathy guys. Wasn't out looking for it but it's still very appreciated.

Hope your manual trading wasn't too expensive a screw up!

£500 with the trade still in the market. To be honest, sounds worse than it is, I got fed up of the GBP/USD exchange rate mangling with my accounts (I'm planning on moving to the US, and so the recent change in exchange rate wasn't exactly great), so while it looks like a £500 loss it's actually a no-change after I move.

I hope.

That make any sense?
 
Top