• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 10:39am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 10:39am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Magic numbers question 12 replies

What does GMT shift and GMT shift Sun do in this indicator? 0 replies

magic is back! 11 replies

Magic Numbers for Mutiple EA 9 replies

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 32
Attachments: magic shift
Exit Attachments
Tags: magic shift
Cancel

magic shift

  • Last Post
  •  
  • Page 1 2345 6
  • Page 1 234 6
  •  
  • Post #1
  • Quote
  • First Post: Edited Dec 11, 2009 12:46pm Nov 25, 2009 11:23am | Edited Dec 11, 2009 12:46pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Hello,

I want to bring a system to your attention that is so simple and at first sight its simple rules seem to be so bizzarre and unreal that nobody in his right mind would even think about trading something like that. Yet it has a solid foundation in time series analysis and I trade it live and with profit for some weeks now, but it stopped working at the exact day i started this thread here.

Don't trade this system live! This system only exists to teach us a lesson. I'm still trying to figure out what exactly this lession is.


Rules are as follows:

Instrument: EUR/USD
Timeframe: H4 (may also work on H1 with different parameters, see Post 37 and 39)
Indicator: Accelerator Oscilator (the built in in Metatrader)

Only take action at opening of a new H4 bar. On bar open look at the value of the Accelerator 61 Bars before the current bar:
* if it is positive: trade short (or reverse a previous long)
* if it is negative: trade long (or reverse a previous short)

You will have only one open position at any time, either you are long or you are short, you are always in, just reverse when the sign of the accelerator changes. No stops, No limits.

in algorithmic form this would look like that:
Inserted Code
int magic_shift = 61;

void onOpen(){
   double historic_move = iAC(NULL, 0, magic_shift);

   if (historic_move < 0){
      closeShortGoLong();
   }else{
      closeLongGoShort();
   }
}
9 Years (different shift)
Attached Image (click to enlarge)
Click to Enlarge

Name: 2001.gif
Size: 7 KB


2 Years (different shift)
Attached Image (click to enlarge)
Click to Enlarge

Name: 2008.gif
Size: 6 KB


1 Year (magic shift = 61)
Attached Image (click to enlarge)
Click to Enlarge

Name: 2009.gif
Size: 6 KB


May the discussion begin!


Attached is a little EA. The default setting is -61, this means 61 bars back, trade in opposite direction. Positive numbers would mean trade in the same direction. The EA will write an offline chart for the equity (updating realtime), the default name for this chart will be msEURUSD, D1
Attached File(s)
File Type: mq4 magic_shift.mq4   18 KB | 1,196 downloads
  • Post #2
  • Quote
  • Nov 25, 2009 11:31am Nov 25, 2009 11:31am
  •  cspip
  • | Joined Aug 2009 | Status: Member | 1,871 Posts
Yes, looks simple.......and nice graphs there

How did this idea come about, (going back 61 candles/bars) ?

And Stops......Take Profit?

Do you check back on each new 4 hour bar ?
 
 
  • Post #3
  • Quote
  • Nov 25, 2009 11:37am Nov 25, 2009 11:37am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting cspip
Disliked
How did this idea come about, (going back 61 candles/bars) ?
Ignored
I spent months with neural nets, support vector machines, ARIMA models and similar things, trying to find repeatable patterns in the history until i realized that i was only exploiting autocorrelations. Then i simplyfied the model to the point where only one autocorrelation lag was left and still got the same (or even better) results than with all the complicated machine learning stuff.
 
 
  • Post #4
  • Quote
  • Nov 25, 2009 11:41am Nov 25, 2009 11:41am
  •  piptalk
  • Joined Nov 2008 | Status: Member | 766 Posts
Not sure of the 61 bars back,,,So you count back 61 bars and if the the current bar is + or - you enter the trade?,,,
 
 
  • Post #5
  • Quote
  • Nov 25, 2009 11:41am Nov 25, 2009 11:41am
  •  Heral
  • | Joined Jan 2009 | Status: Member | 81 Posts
hi 7bit

and why 61 bars?
 
 
  • Post #6
  • Quote
  • Nov 25, 2009 11:46am Nov 25, 2009 11:46am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting Heral
Disliked
why 61 bars?
Ignored
how? found by just trying them all.
Why? Characteristic property of this market at this time. Maybe a proof for the existence of extensive robo trading by big players.
 
 
  • Post #7
  • Quote
  • Nov 25, 2009 11:49am Nov 25, 2009 11:49am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting piptalk
Disliked
Not sure of the 61 bars back,,,So you count back 61 bars and if the the current bar is + or - you enter the trade?,,,
Ignored
Exactly as i wrote it. Look at the unmistakable code snippet for reference.
 
 
  • Post #8
  • Quote
  • Nov 25, 2009 11:54am Nov 25, 2009 11:54am
  •  Aggs
  • | Joined Sep 2009 | Status: Member | 20 Posts
Do we check at the start of each 4 hr bar? Also suppose if I go long on a new 4hr bar open, then when will I close the trade..
 
 
  • Post #9
  • Quote
  • Nov 25, 2009 11:54am Nov 25, 2009 11:54am
  •  fxmatahari
  • | Joined Oct 2009 | Status: Member | 68 Posts
Quoting 7bit
Disliked
Hello,

I want to bring a system to your attention that is so simple and at first sight its simple rules seem to be so bizzarre and unreal that nobody in his right mind would even think about trading something like that. I trade it live and with profit for some weeks now.

Rules are as follows:

Instrument: EUR/USD
Timeframe: H4
Indicator: Accelerator Oscilator...
Ignored
Hi 7bit
Can you put up some charts? Thanks. (I am a newbie)
 
 
  • Post #10
  • Quote
  • Nov 25, 2009 11:58am Nov 25, 2009 11:58am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting Aggs
Disliked
Do we check at the start of each 4 hr bar? Also suppose if I go long on a new 4hr bar open, then when will I close the trade..
Ignored
Read the first Posting! If we are already long from the previous bar then of course we just stay long (do nothing), if we were short we reverse the trade (close the short and open a long).
 
 
  • Post #11
  • Quote
  • Nov 25, 2009 12:00pm Nov 25, 2009 12:00pm
  •  shiva
  • Joined Aug 2007 | Status: Doing It In Dubai | 2,457 Posts
Just scrolling back would be time consuming, perhaps there is an indicator which marks checks back 61 bars long and short on each h4 bar?
 
 
  • Post #12
  • Quote
  • Nov 25, 2009 12:01pm Nov 25, 2009 12:01pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting fxmatahari
Disliked
Hi 7bit
Can you put up some charts? Thanks. (I am a newbie)
Ignored
I dont recommend it to newbies.

This system is not meant to be traded by hand, but if you want: put an accelerator on your chart, count backwards 61 bars and read the old accelerator value there.
 
 
  • Post #13
  • Quote
  • Nov 25, 2009 12:03pm Nov 25, 2009 12:03pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting shiva
Disliked
Just scrolling back would be time consuming, perhaps there is an indicator which marks checks back 61 bars long and short on each h4 bar?
Ignored
Would be easy to write. And since these are historic values that cannot repaint it would be even possible to plot the signals up to 2 weeks (61 bars) into the future.
 
 
  • Post #14
  • Quote
  • Nov 25, 2009 12:05pm Nov 25, 2009 12:05pm
  •  shiva
  • Joined Aug 2007 | Status: Doing It In Dubai | 2,457 Posts
Exactly, I am looking around for one now
Quoting 7bit
Disliked
Would be easy to write. And since these are historic values that cannot repaint it would be even possible to plot the signals up to 2 weeks (61 bars) into the future.
Ignored
 
 
  • Post #15
  • Quote
  • Nov 25, 2009 12:20pm Nov 25, 2009 12:20pm
  •  Heral
  • | Joined Jan 2009 | Status: Member | 81 Posts
hi, i have different results for the two years backtest

i've wrote a little ea and i have the same results in one year but in two years not, i see that you use other shift for two years, is this correct?

this is my backtest for two years:
Attached Image (click to enlarge)
Click to Enlarge

Name: 1.jpg
Size: 84 KB
 
 
  • Post #16
  • Quote
  • Nov 25, 2009 12:26pm Nov 25, 2009 12:26pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting Heral
Disliked
hi, i have different results for the two years backtest

i've wrote a little ea and i have the same results in one year but in two years not, i see that you use other shift for two years, is this correct?

this is my backtest for two years:
Ignored
Yes, this 61 shift only started about after last september (and has been extremely stable since then). Older parts of the history have different shifts, you can easily find them (and the times where they changed) by using the optimizer.

You can also experiment by inverting the rules (go long instead of short and vice versa), there are also positive autocorrelations.
 
 
  • Post #17
  • Quote
  • Nov 25, 2009 12:31pm Nov 25, 2009 12:31pm
  •  cspip
  • | Joined Aug 2009 | Status: Member | 1,871 Posts
Just wondering, but why wouldn't you recommend this to newbies ?
 
 
  • Post #18
  • Quote
  • Nov 25, 2009 12:38pm Nov 25, 2009 12:38pm
  •  jtmoore007
  • | Joined Jun 2008 | Status: Member | 792 Posts
Quoting 7bit
Disliked
Yes, this 61 shift only started about after last september (and has been extremely stable since then). Older parts of the history have different shifts, you can easily find them (and the times where they changed) by using the optimizer.

You can also experiment by inverting the rules (go long instead of short and vice versa), there are also positive autocorrelations.
Ignored

how about sharing the ea for all of us non programmers.
 
 
  • Post #19
  • Quote
  • Edited 3:48pm Nov 25, 2009 12:39pm | Edited 3:48pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting cspip
Disliked
Just wondering, but why wouldn't you recommend this to newbies ?
Ignored
This can only be traded with an EA. I tried trading this manually by using only some of the signals that seemed right but were bad and ignoring others that seemed wrong but proved to be right after a few bars. This is the behaviour i expect from newbies.

This system has absolutely no room for any interpretations, the signals are sometimes absolutely counterintuitive, you must follow them all or it will fail.
 
 
  • Post #20
  • Quote
  • Nov 25, 2009 12:44pm Nov 25, 2009 12:44pm
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting jtmoore007
Disliked
how about sharing the ea for all of us non programmers.
Ignored
I have made something similar, it doesn't use the accelerator, but it does something very similar: http://sites.google.com/site/prof7bit/autocorr

The above is NOT an EA for this system, it just shares its main idea.
 
 
  • Trading Systems
  • /
  • magic shift
  • Reply to Thread
    • Page 1 2345 6
    • Page 1 234 6
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