Gday: a D1 Stochastic OB/OS trading robot

Locked
ROBST3R
Trader
Posts: 86
Joined: Fri Dec 16, 2011 7:33 pm

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by ROBST3R »

hi i got alot of orders! opening and closing! Like 100 orders!


What am i doing wrong?

It also opened a chf/jpy order already +55 pips
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by SteveHopwood »

I added code to Gday on my development machine to make it read stoch every tick. It is reading the indi correctly.

So, the 'frozen' readings that triggered the trade appear to be correct. Could it be, I wonder, that the signal line touching 24 was lost when I changed the indi K% input from 5 to 8? No idea. Any thoughts, gals and galesses?

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

garyfritz wrote:Hm. I haven't spent the time you have watching the charts right at the close, so I'm guessing a little. But based on my understanding of how Empty4 behaves -- which I think is very similar to other platforms I know much better -- I think this is happening:

* Only the last (right-most) candle changes. It updates with every tick.
* All older candles are static snapshots of how they looked at the CLOSE of that candle.
* Indicators update along with the bar. An indicator like Stoch only changes when the bar changes, so only the right-most Stoch value changes. I can see that happening on a daily chart now.
* When the first tick of a new candle arrives, Empty4 realizes it's a new candle. It shifts the old candles to the left, freezes the previously-rightmost candle (and its stoch value) at the state it was in when the "last tick in the candle" arrived, and starts displaying the new candle.
* The stoch indicator on first tick of the new candle reflects the value using the new tick's Close -- which, since it's the first tick, is also the new candle's Open. If that new tick is different than the last tick of the previous candle, the stoch value will be slightly different.
* The stoch value also changes slightly because when you add a new candle, you drop an old candle off the end of the stoch calculation. So that can cause it to change more than the equivalent tick-to-tick change inside a candle.

I just watched several M1 candles close, and they worked the way I expected. The same thing should happen at the close of a D1 candle.

So if you've done any visual backtesting, you were using the Close value of the stoch on that candle. That "frozen snapshot" of the Close value of the stoch indicator is all the chart displays. If you use any knowledge of the indicator values at any time other than the close, such as looking at the value right after a new candle starts, you can't replicate that with visual backtesting.

Using the value of the stoch at the CLOSE of yesterday's candle -- which should be very close to the open of the new day's candle -- would be visually backtestable. But I don't know how it will affect your results. You're acting when the new candle opens and the stoch Signal crosses the OB/OS level. If you don't act until the CLOSE of that new candle, you'll enter a day later. On the other hand you might avoid some false entries that way. We'd have to test it to see if it works as well as your method.

Hey Gary,

Sorry for my delayed response, it's been an incredibly busy day and it's now 11.20pm and finally I am getting to my computer for the first time tonight!

I am not going to argue with anything here, I simply don't have the technical knowledge you have. so if this is how it works technically...then so be it.
My comments/rules are purely from my observation on how I see things work rather than the technicalities (which I understand need to be known in order for them to be coded).
Obviously this all happens in a split second so for me watching it appears the stoch updates at the open, but clearly it must be right on the close.

All I know is when the candle closes and the new one opens is when I make my decision to trade.
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by spyderman »

I have placed the new bot on all my charts. ootb other than crim and comment
It is showing a complete blank after the "Trade Status:" :x
Whereas it showed up as waiting for a trade or neutral in previous version.
Snaggin' some pips
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

gaheitman wrote:
fxozgirl wrote: 1. Are both the stoch line and the signal line in ob/os? Yes/No
if No, check again tomorrow
if Yes, go to 2.
Just to confirm, at the close of yesterday's candle, both the main and signal lines are above OB line for a buy. Meaning the main line can't cross below until the day of the trade.

Sorry George...I can't quite follow this statement, can you please clarify?
fxozgirl wrote:2. Has there been a cross of the stoch & signal line in the ob/os zone? Yes/No
if No, check again tomorrow
if Yes, go to 3.
Do they have to cross on the previous bar?

No, they can cross anytime whilst in ob/os. As you would know price can stay ob/os for days/weeks, so as long as there has been a cross, anytime both stochs move out of ob/os is a valid trade set up.
3. Has both the stoch line and the signal line crossed back out into the neutral zone? Yes/No
if No, check again tomorrow
if Yes, take the trade
Again, do both have to cross the OB line at the beginning of the new day?
Not necessarily...quite often the stoch (main line) moves faster and may have already crossed out of ob/os and we are only waiting for the signal line to cross over.

Coding what you are doing is not difficult, I think we are just concerned that you visual back-testing may be overstating the pip gain. If by "visual back-testing" you mean scrolling back in time and looking at the charts, then you are most likely overstating the gains and understating the losses. If your data comes from watching the trades each day and paper trading them, then your data should be completely valid.

That being said, if you did well enough trading live, our back-testing concerns may not matter. :D

My results forward demo testing were:
27/05/11 - 27/07/11 = 2844.3

Live trading results
07/07/11 - 27/07/11 = 739.4 (2 trades)

In my thread at FF I posted a screenshot of every single trade I took in this period both when I placed the trade and also when I closed each trade.

Given I had not traded this method since the end of July, I wanted to check and see if the same parameters would still be effective.
My visual backtest was just a scrolling back through the charts and determining where trades would have been taken, and in order not to overstate claims, I was ultra conservative with any results that may have been achieved. In actual fact results based on straight visuals would have been over 8000 pips not 2000, but really this is irrelevant I really just wanted to see that the same method would produce positive results and I believe it does.



George
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

garyfritz wrote:Shelley, I noticed in your FF thread that after the start of Daylight Savings Time, you started taking your signals slightly *before* the daily candle closed. How did that work out?

That would be using the Close of yesterday's bar (or close to it), rather than the opening tick of today's new bar. If that worked well, then you could use the close values for visual backtesting to get the same result.

Hi Gary,

The reason I tried this was I really wanting to get back to this trading method as it had proved successful previously. As I could no longer be at the computer at the close/open of the candle, I though I would try pre-empting the signal.
Unfortunately, this wasn't satisfactory and I found myself 'guessing' where the stoch's would be and often being wrong, so I abandoned this avenue.
I also looked at trading on the 4h chart, but again I was inconsistent with my screen time due to work/family committments, so this didn't really work for me either.

That was the main reason I asked Steve if he would code an ea, as I believe the system (as per my rules) is very effective.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

SteveHopwood wrote:
fxozgirl wrote:Hi guys, just to let you know I'm at work just now so can't respond to your posts until later. I've logged in on my phone.

I work for Mattel so you can imagine how busy it is right now.
Unfortunately you all live in a remote part of the world :lol: so the time differences delay our responses.
Back soon!
Eee by gum, but you Aussies have it tough. Not only are you standing upside down, but you have to try to work at the same time. Life is unfair.

Hey, look on the bright side. Here in the UK it is absolutely bloody freezing. We get about 3 seconds of daylight per day and the roads are Hell. Even here in the middle of nowhere, we are constantly having to dodge tight-lipped lunatic drivers who 'absolutely have to get such-and-such done in time for Christmas'.

Hmmmmm. Is there a need for dodgy coders in Aussie? I could learn to stand upside down and bash the Poms every 4 years, honest. :lol:

Have a pleasant day. I hope you return home to find what you expect from the latest version.

:D

there's always room for another pom here...as long as when the ash's is on you go for the Aussies.
You can't have your cake and eat it too you know!
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

bobasker wrote:Thanks for the trading concept Shelley and thanks Steve for the EA...

One thing I have noticed is the different %K period between Shelley's screen shots and Steves, I've read through the entire thread and couldn't see why the variant, then again I am old and decrepit so could be just me..... :D

And hi from a fellow Aussie down the road in Gippsland,

Bob.
Hi Bob,

I see Steve has already responded to your post but
Welcome aboard...we're not too far from each other, I live in Narre Warren :)
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by fxozgirl »

Steve, thanks for your hard work on this ea over the last 24hrs, it's definitely appreciated.

Just an update on the trade Gday took for me yesterday - usdchf buy

Price has gone up and the trade was moved to breakeven after reaching 50 pips, however the first third of the trade has not closed.

Please see screenshot below:
usdchf_111220.gif
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Gday: a D1 Stochastic OB/OS trading robot

Post by SteveHopwood »

fxozgirl wrote:Steve, thanks for your hard work on this ea over the last 24hrs, it's definitely appreciated.

Just an update on the trade Gday took for me yesterday - usdchf buy

Price has gone up and the trade was moved to breakeven after reaching 50 pips, however the first third of the trade has not closed.

Please see screenshot below:
usdchf_111220.gif
I got that on my trade as well. I had Breakeven enabled, and this function is called before the Jumping Stop. There is no part-close in Breakeven. Gday saw the opportunity to move the stop to +2 in Breakeven, so Jumping Stop saw no need to close part of the trade, because its decision on whether to lose or not depends on it seeing a need to move the stop in the first place.

Breakeven needs removing and Gday using JS for this instead. For now, disable BE. Unless you already had it disabled, in which case it is a bug.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Locked

Return to “Automated trading systems”