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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Trading Swing by Swing 39 replies

Bad Robots - The Swing n' Miss approach to learning Forex 5 replies

Swing high / Swing low indictator+alert? 19 replies

Swing highs and swing lows 3 replies

swing high/swing low indicator and volume tic history 13 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 56
Attachments: Swing momentum trading - the robots are taking over
Exit Attachments

Swing momentum trading - the robots are taking over

  • Last Post
  •  
  • 1 13141516Page 17 18
  • 1 1516Page 17 18
  •  
  • Post #321
  • Quote
  • Jun 12, 2010 5:46am Jun 12, 2010 5:46am
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
Quoting squalou
Disliked
we all have the same issue here: finding the correct settings for RsiTF, RsiPeriod, SuperSignalShift and SuperSignalDist2.

Backtesting and optimizer show that these settings are definitely dynamic, no do-it-all set is possible.

And they will also be different for different pairs...
Ignored
Could you explain waht the SuperSignalDist2 does? I know the SuperSignalShift used to be called like the candleshift which factored in the # of candles to calculate the signal. But not sure what the dist2 does.

I'm not sure if an EA can automatically run an optimizer at the end of each week. So like every Friday night, after the markets close it could auto optimize the settings for all the pairs that we are running it on since your research shows that a 5 day optmizer would be dynamically best. Or even just save out a .txt file with the new #'s after it runs the optmizer so we can go in manually and change it by hand (we can't possibly be that lazy can we?)
  • Post #322
  • Quote
  • Jun 12, 2010 9:40am Jun 12, 2010 9:40am
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
Quoting obnoxious2
Disliked
Could you explain waht the SuperSignalDist2 does? I know the SuperSignalShift used to be called like the candleshift which factored in the # of candles to calculate the signal. But not sure what the dist2 does.

I'm not sure if an EA can automatically run an optimizer at the end of each week. So like every Friday night, after the markets close it could auto optimize the settings for all the pairs that we are running it on since your research shows that a 5 day optmizer would be dynamically best. Or even just save out a .txt file with the new #'s...
Ignored

SuperSignalDist2 is the distance ("period") to look for highest or lowest prices.
A swing ("strong buy/sell") is signalled as soon as a bar shows a retrace compared to the past dist2 bars extremes.

What SuperSignal does actually is very simple:
it just points an arrow at the candle giving the highest high or lowest low over the past dist2 bars, for each bar,
and Shift is how many bars we want to wait before considering the swing signal as confirmed, ie the swing signal has not changed in the past Shift bars.

To get more familiar with the SuperSignal behaviour, start a backtest in visual mode, pause it quickly, load the "ss ea.tpl" template i posted earlier, on the visual chart to get the indicators, push the visual speed to max(32), then resume the backtest, and see how the SuperSignal arrows are repainting to finally lock after a confirmed reversal.

You will clearly see the arrows jumping from bars to bars, following the lower lows (for down signals), to finally "lock" on the last lower low bar when price retraces and an buy signal takes over.

It actually does pretty much the same as any ZigZag indicator does, painting arrows instead of zigzag lines.
But the result is basically the same: they both lock (reverse) at swing points, ie lowest lows or highest highs.
When you put such indis on a chart, it looks like magic to show you the PAST swings, because they are locked already, but they actually repaint a lot before locking, and when they lock, it's well after the swing point itself (lagging).

Because they need some time lock in the swing signal (this is the "lag"),
you cannot just jump in on the first signal: the signal arrow will repaint over multiple bars before locking in, and possibly MANY bars during a trending period -- and you would be in counter trend all the way, until you eventually hit your SL!

This is why we use Shift to give us the "lag" or delay that we consider sufficient to take it as a confirmation of the swing -- we just hope that the next bar won't just continue the original movement, and therefore repaint the same arrow again a bit farther...
waiting will lower whipsaws, if we choose the "best" Shift(=lag) value.

So, it's all about determining how many bars we want to wait before considering the swing as confirmed -- this is the Shift(=lag) value -- and how far in the past to look for highest/lowest values -- this is the Dist2 value.

These 2 parameters are essential to provide "good" swing signals, and will depend on the overall price pattern.
This is why they will be different for each pair, evolving from one period to the next, and even be different for different time of the day.
At least this is my strong impression.

This is why i found that the 5-days sliding window gives much better results than just optimizing over, say, 3 or 6 months period.
We stick better to the price pattern changes.

I will also consider using different intraday time segments to give different sets depending on the sessions probably -- london, NY, Tokyo, and between NY and tokyo sessions.
These 4 intraday time segments may very well behave differently and therefore give very different Shift/Dist2 values.
For each pair of course...

That gives you an idea of the amount of work needed optimize settings, and why an automated optimization process is useful.
I'd rather not want to manually run 28 optimizations every day (4*7 pairs)...

All we need to know is how to batch the optimizer.
Retrieving the settings within the EA itself is very easy (we know how to read files, etc from an EA, that's the easy part...).

All hands welcome!

Sq
  • Post #323
  • Quote
  • Jun 12, 2010 9:53am Jun 12, 2010 9:53am
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
Another research direction would be to code the optimization directly into the EA...

Finding the best settings for the indicator over the past XX period, that would give us the swing signals that repaint the less overall.

I think this should not be that hard...

I might jump into doing that some day.
That would also open an entire new perspective for almost all kinds of EAs...
Pretty much like converging Neural Networks coefficients (also commonly called "training or "learning") ...

A bunch of nested loops should do it !

Then we can just run an EA that permanently optimizes in parallel to the EA that actually trades, in the same MT4 chart...

Sounds cool, no ?...

ok, got to get my feet back to the ground...

Sq
  • Post #324
  • Quote
  • Jun 12, 2010 11:51am Jun 12, 2010 11:51am
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
sq thank you so much for the detailed explanation. It really helped clear it up.

You was saying about 4 different timezones to optimize. Personally, I "only" ever trade manual on london and NY session since there is much more volume activity. I would say to use the Asian time leading up to the open of the London to be monitoring possible swing entrances. I find from manual experience that there is too much ranging during the Asian session.
  • Post #325
  • Quote
  • Jun 13, 2010 11:04pm Jun 13, 2010 11:04pm
  •  Invisible
  • | Joined Nov 2009 | Status: Member | 469 Posts
Not sure what the significance of this is, but when I ran Squaloo's version on a number of pairs last week, only GBPUSD traded, and only this pair had the display running as I would expect it to. Rebooting the platform did not help. However, when I rebooted my VPS over the weekend, the other pairs had their displays showing correctly and they also started trading as well.
  • Post #326
  • Quote
  • Jun 14, 2010 12:51pm Jun 14, 2010 12:51pm
  •  rfking2
  • | Joined Apr 2010 | Status: That One Guy | 127 Posts
Quoting squalou
Disliked
Another research direction would be to code the optimization directly into the EA...

Finding the best settings for the indicator over the past XX period, that would give us the swing signals that repaint the less overall.

I think this should not be that hard...

I might jump into doing that some day.
That would also open an entire new perspective for almost all kinds of EAs...
Pretty much like converging Neural Networks coefficients (also commonly called "training or "learning") ...

A bunch of nested loops...
Ignored
I think RR would be the best person to talk to. His HiLo bot does its own backtesting and optimization to determine breakout or counter trend moves. However I think he uses his server for specialized coding.
  • Post #327
  • Quote
  • Edited at 2:14pm Jun 14, 2010 2:01pm | Edited at 2:14pm
  •  tazmaan
  • | Joined May 2008 | Status: Member | 1,114 Posts
Is this thread of any help?

http://articles.mql4.com/506

or the attached, which i believe is from the same guy. over my head, but you can probably figure it out
Attached File
File Type: zip MTOptimizer.zip   3.5 MB | 769 downloads
  • Post #328
  • Quote
  • Jun 14, 2010 4:57pm Jun 14, 2010 4:57pm
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
Quoting tazmaan
Disliked
Is this thread of any help?

http://articles.mql4.com/506

or the attached, which i believe is from the same guy. over my head, but you can probably figure it out
Ignored
You're right on target Tazmaan !!!!
This is EXACTLY the idea i was describing, and here you are serving it to me !

I'll study that into details right away.
Many thanks !!!


Sq
  • Post #329
  • Quote
  • Jun 14, 2010 5:11pm Jun 14, 2010 5:11pm
  •  tazmaan
  • | Joined May 2008 | Status: Member | 1,114 Posts
Awesome! I am glad it is of use to you. I remember finding that like 6 months ago or so, and not having any idea what to do with it. You, knowing how to code and understand what needs to be added, should be able to make good use of it
Look forward to seeing what you come up with!
  • Post #330
  • Quote
  • Jun 14, 2010 7:03pm Jun 14, 2010 7:03pm
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
Quoting rfking2
Disliked
I think RR would be the best person to talk to. His HiLo bot does its own backtesting and optimization to determine breakout or counter trend moves. However I think he uses his server for specialized coding.
Ignored
Yes, i talked to RR already.
This guy is BRILLIANT!

Indeed, his Hilo Trader has a built-in profit optimizer function.

I had coded long time ago a trade-orders simulator on the GFT Dealbook360 platform, that was drawing an equity curve indicator.
It did not have the optimization layer on top of it (basically a loop on all desired parameter values), because it was really a pain in the ass to code, and sooooooooooo slow...
-- man, what a poor platform they have compared to MT4 (in terms of programming capabilities)...
I'm so happy to code on mt4 now, you just cannot believe how much...

Thanks for the input.

Sq
  • Post #331
  • Quote
  • Jun 16, 2010 11:24am Jun 16, 2010 11:24am
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
Been running the bot on the major pairs for the last week using the settings that sq found thru backtesting. I must say it definitely takes the right moves. Sometimes it moves against you since the TF is lower and we're counting less bars but eventually it does move alot in the right direction.

I am using mptm to manage but it seems to be having issues handling the trades. It will handle trades for a bit but then just stop working for no apparent reason. I had a few trades overnight that went 80 pips or so in the right direction without any partial closes since I have jumping SL of 25 pips. Not sure what the issue is. When I close the chart and reload it, it will instantly handle the trades and partially close a bunch of them. I've tried shutting down the platform, recompiling the code. Anyone know why?
  • Post #332
  • Quote
  • Jun 17, 2010 9:06am Jun 17, 2010 9:06am
  •  octomanoak
  • | Joined Feb 2009 | Status: Member | 348 Posts
Quoting obnoxious2
Disliked
Been running the bot on the major pairs for the last week using the settings that sq found thru backtesting. I must say it definitely takes the right moves. Sometimes it moves against you since the TF is lower and we're counting less bars but eventually it does move alot in the right direction.

I am using mptm to manage but it seems to be having issues handling the trades. It will handle trades for a bit but then just stop working for no apparent reason. I had a few trades overnight that went 80 pips or so in the right direction without any partial...
Ignored
Can you post the set files you are using for the bot and for MPTM? Maybe we can look at them and see if we see any problem with the settings.
  • Post #333
  • Quote
  • Jun 17, 2010 12:22pm Jun 17, 2010 12:22pm
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
Quoting octomanoak
Disliked
Can you post the set files you are using for the bot and for MPTM? Maybe we can look at them and see if we see any problem with the settings.
Ignored
I have attached both preset files in as a zip. Thanks for your help.
Attached File
File Type: zip super signal and mptm preset.zip   2 KB | 937 downloads
  • Post #334
  • Quote
  • Jun 17, 2010 1:04pm Jun 17, 2010 1:04pm
  •  octomanoak
  • | Joined Feb 2009 | Status: Member | 348 Posts
Quoting obnoxious2
Disliked
I have attached both preset files in as a zip. Thanks for your help.
Ignored
Nothing jumps out at me as the problem from your set files, although I have not tried partial close settings without also having a breakeven setting. Perhaps you could try adding the breakeven setting to see if that makes a difference.

It might also be an issue with the global variables that MPTM uses. It can occur that an earlier setting for MPTM or a change in MPTM settings when there are open trades could result in unexpected behavior. This happened once to me. I would suggest when you have no open trades, save the mptm settings you want in a set file, remove MPTM from its chart, go into global variables and delete all global variables, restart MT4, reload MPTM and then the set file for it. That might solve your problem as well.
  • Post #335
  • Quote
  • Jun 18, 2010 11:43pm Jun 18, 2010 11:43pm
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
Quoting octomanoak
Disliked
Nothing jumps out at me as the problem from your set files, although I have not tried partial close settings without also having a breakeven setting. Perhaps you could try adding the breakeven setting to see if that makes a difference.

It might also be an issue with the global variables that MPTM uses. It can occur that an earlier setting for MPTM or a change in MPTM settings when there are open trades could result in unexpected behavior. This happened once to me. I would suggest when you have no open trades, save the mptm settings you want in...
Ignored
Thanks for the advice octo! I cleared the global variables and it's performed pretty stable for the last day. I guess I need to make it a habit to clear global variables every week.
  • Post #336
  • Quote
  • Edited at 12:38pm Jun 25, 2010 12:23pm | Edited at 12:38pm
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
This post is not exactly targetted to the EAs we are talking about in this thread, but as I am currently working on implementing an embedded-optimizer for the SS EA, i found this little tool really useful.

I have coded for myself a nice little "indicator"... which is actually not a market-oriented "indicator"...

It will show you very explicitely your past trades on any chart, and will also work on backtesting charts.

This helps me a lot to evaluate the quality of my entries and exits, and see how to make them better.

An image will be much better than any explanation, so here a typical result plotted on a backtest result chart:

Attached Image (click to enlarge)
Click to Enlarge

Name: showTrades.gif
Size: 38 KB



As you can figure out, the blue boxes are winning trades, orange boxes are loosing trades. It also gives you the pip count for each trade.

Note that this indicator will also work on backtest visual results (the example image is taken from a backtest result chart).

In order to use it on backtest charts, you can do it in 2 different ways:

- run the backtest in visual mode: pause the backtest, load your favorite template if you wish, then drag SQ_showTrades to the backtest chart, then resume the backtest. It will update the boxes live at each new bar.

- run the backtest in non visual mode; when it is done, click on "Open Chart", then drag SQ_showTrades to the backtest chart, and you'll get instantly all the backtested trades plotted.

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

Inputs are pretty simple:

- MagicNumber: 0 will show you all trades, otherwize set it to the magic number you would like to filter.
That will cope nicely with MPTM for instance

- RefreshEvery=1;
// refresh every given minutes, 0 will refresh at beginning a each bar only
// default is every minute;

- and box colors.

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


So now, in order to optimize an EA, just look for growing the blue boxes, and squeezing the orange ones, and you've got your best settings...


Enjoy...
SQ
Attached File
File Type: mq4 SQ_showTrades.mq4   10 KB | 5,057 downloads
1
  • Post #337
  • Quote
  • Jun 26, 2010 10:09am Jun 26, 2010 10:09am
  •  octomanoak
  • | Joined Feb 2009 | Status: Member | 348 Posts
Quoting squalou
Disliked
This post is not exactly targetted to the EAs...
SQ
Ignored
Squalou, that looks like an excellent tool. Thank you for posting it. I'm going to give it a try.
  • Post #338
  • Quote
  • Jun 29, 2010 12:17pm Jun 29, 2010 12:17pm
  •  obnoxious2
  • | Joined May 2010 | Status: Member | 276 Posts
That is very impressive SQ! Thanks for this. I will check it out. Hope you've been having more luck with encoding the optimizer in. I feel liek with all the bots that Steve generally shares with us, the SS bot has the most potential since we can adjust it dynamically for each pair and for different time frames. It is just finding the right settings and figuring out how often to optimize.
  • Post #339
  • Quote
  • Jun 29, 2010 1:33pm Jun 29, 2010 1:33pm
  •  squalou
  • Joined Mar 2010 | Status: Member | 588 Posts
I use that showTrades everywhere now...
It's just so much easier to watch your trades in colors...
especially in backtesting mode.
Preferably in Blue...

You can even add the indicator directly into the EA, so it will load it in backtesting as well, and show the results instantly without having to drag it to the chart...

Just add the following line in the EA's "init()" function and that'll work:

Inserted Code
  init()
{
...some code...

[b]  iCustom(NULL, 0, "SQ_showTrades",Magic, 0,0);[/b]

}//end of init()
replace the "Magic" with whatever magicnumber input the EA has, or 0 if it doesn't. -- watch-out that it may also show your 'live' trades in the backtest chart though...
just use a different magic number for backtesting.


My auto-optimizer is still not working right yet...
haven't had much time on it lately...
but will do

SQ
  • Post #340
  • Quote
  • Jun 30, 2010 8:01am Jun 30, 2010 8:01am
  •  jimmynoodles
  • | Joined Feb 2010 | Status: Saved by Grace | 276 Posts
Quoting squalou
Disliked
I use that showTrades everywhere now...
It's just so much easier to watch your trades in colors...
especially in backtesting mode.
Preferably in Blue...

You can even add the indicator directly into the EA, so it will load it in backtesting as well, and show the results instantly without having to drag it to the chart...

Just add the following line in the EA's "init()" function and that'll work:

[code]...
Ignored
Hi Squalou,
Just wanted to say thanks for your effort on the indicator and your generosity in making it freely available. Its awesome thanks.
Noodles
The best trade I ever made was my SIN for Jesus' RIGHTEOUSNESS.
  • Commercial Content
  • /
  • Swing momentum trading - the robots are taking over
  • Reply to Thread
    • 1 13141516Page 17 18
    • 1 1516Page 17 18
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 / ©2021