stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Gday: a D1 Stochastic OB/OS trading robot
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=168
Page 20 of 71
Author:  Dewey McG [ Thu Dec 22, 2011 5:01 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

Two questions:

If you have Zeljko set to true (or only trade currency twice) will that only apply to the GDay EA, or to any EA's you have going on as well?

Secondly, and chance of adding an inpuit for risk instead of just selecting lot size?

Thanks.
Author:  SteveHopwood [ Thu Dec 22, 2011 7:07 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

alex_forex wrote:Steve,

There are 2 versions of Gday.mq4 in the first post, can you please put an information to know which one is which variant ?

Thanks in advance
Regards
Alex
Thanks Alex. I forgot to remove the older one. Removed now. If you downloaded the top one with the new Volatility input, then you have the latest.

:D
Author:  SteveHopwood [ Thu Dec 22, 2011 7:23 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

Dewey McG wrote:Two questions:

If you have Zeljko set to true (or only trade currency twice) will that only apply to the GDay EA, or to any EA's you have going on as well?
Applies to all trades sharing Gday's magic number.
Secondly, and chance of adding an inpuit for risk instead of just selecting lot size?

Thanks.
None. Gday needs to know what the original lot size is to be able to divide it by 3, and so cannot cp[e with a variable lot size.

:D
Author:  fxozgirl [ Thu Dec 22, 2011 9:02 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

SteveHopwood wrote: So, BE and JS are now separate. BE is disabled by default; JS is enabled. Strictly speaking, BE is no longer needed but I leave it in for those who want a move to BE but then no further trailing/jumping of the stop.

The ea took trades this morning for eurjpy, gbpaud & eurusd (semi auto mode)
I am using the version with the fixed BE/JS (but not with the volatility calculator) and had left BE to false as per the above. Just checked a short while ago and trade was at +58 pips and BE hadn't been set, so turned BE function on and immediately first third of trade closed and BE was set, so it appears that we still need to have the BE function set to true.

I was also really pleased to see the fully automatic version I am running separately also opened the exact same trades.

All trades are currently in profit with eurusd now at BE along with cadjpy that opened yesterday.

:D
Author:  SteveHopwood [ Thu Dec 22, 2011 9:16 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

Latest update in post 1.

Breakeven still is not working and I am fed up with it now. We are going back to one of my earlier plans, which is to enforce BE if JS is enabled. JS cannot kick in until the stop is at BE or better.

If this doesn't work, then I shall remove the management features entirely from Gday and we will all use mptm.

:D
Author:  SteveHopwood [ Thu Dec 22, 2011 9:44 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

I have updated the bot a little more, when I remembered that we no longer need AddBEP in the JS inputs. This is no biggie, so those of you who have downloaded after reading my previous post can hang on until something more significant emerges.

:D
Author:  Aussie Phil [ Thu Dec 22, 2011 10:10 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

I loaded 24 pairs 12 hours ago Cowboy Go Markets Au demo with volativity version default (chill out Shelley)

EU has partialy closed and including those pips the remaining 9 open positions are 300 pips up. Not sure how to post screen shot yet but i am working on it. Is anybody else getting similar? I posted earlier that I trade FX Ozgirls system manually and I realize that its early days but it is hard not to get excited. This EA is outstanding!

Congratulations and thank you everybody involved.

Phil
Author:  1of3 [ Thu Dec 22, 2011 10:32 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

Steve, Jumping stop loss is not working for the initial stop because in the JumpingStopLoss() function you are multiplying the JumpingStopPips by 2. Using Shelly's rules that would make the first third close at 100 pips profit not 50.

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + ((JumpingStopPips * 2) * Point) )//George{
The code for buy should be

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + (JumpingStopPips * Point) )//George{
and similarly for SELL

Code: Select all

if (Bid <= sl - ((JumpingStopPips * 2) * Point) )//George
should be

Code: Select all

if (Bid <= sl - (JumpingStopPips * Point) )//George
John
Author:  SteveHopwood [ Thu Dec 22, 2011 11:13 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

1of3 wrote:Steve, Jumping stop loss is not working for the initial stop because in the JumpingStopLoss() function you are multiplying the JumpingStopPips by 2. Using Shelly's rules that would make the first third close at 100 pips profit not 50.

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + ((JumpingStopPips * 2) * Point) )//George{
The code for buy should be

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + (JumpingStopPips * Point) )//George{
and similarly for SELL

Code: Select all

if (Bid <= sl - ((JumpingStopPips * 2) * Point) )//George
should be

Code: Select all

if (Bid <= sl - (JumpingStopPips * Point) )//George
John
Cheers John, but I don't care any more. I had already bust something that didn't actually need fixing in the first place, so I have returned to something that I know works and it is staying put.

Thanks anyway, but if I look at the JS code one more time, people will hear the scream in Taiwan.

:D
Author:  gaheitman [ Thu Dec 22, 2011 12:33 pm ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

1of3 wrote:Steve, Jumping stop loss is not working for the initial stop because in the JumpingStopLoss() function you are multiplying the JumpingStopPips by 2. Using Shelly's rules that would make the first third close at 100 pips profit not 50.

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + ((JumpingStopPips * 2) * Point) )//George{
The code for buy should be

Code: Select all

if (OrderType()==OP_BUY)
    {
       //if (sl < OrderOpenPrice() ) return;//Not at breakeven yet
       // Increment sl by sl + JumpingStopPips.
       // This will happen when market price >= (sl + JumpingStopPips)
       //if (Bid>= sl + ((JumpingStopPips*2)*Point) )
       sl = MathMax(sl, OrderOpenPrice());
       if (Bid >=  sl + (JumpingStopPips * Point) )//George{
and similarly for SELL

Code: Select all

if (Bid <= sl - ((JumpingStopPips * 2) * Point) )//George
should be

Code: Select all

if (Bid <= sl - (JumpingStopPips * Point) )//George
John
That wouldn't work because you move the stop loss by JumpingStopPips, so if you only wait till it moves JumpingStopLoss pips ahead, you are basically just closing the trade on the second jump. The JSL is correct, it was just intended to work with Break Even Stop Loss. Thinking ourselves clever we tried to remove the dependency as well as remove the dependency of having any stop loss set.

The code I submitted yesterday will work with one minor change. Setting our initial sl to be JumpingStopPips away from OrderOpenPrice() would give us the correct jumping behaviour:

Buys:
sl = MathMax(sl, OrderOpenPrice()-JumpingStopPips*Point);

Sells
sl = MathMin(sl, OrderOpenPrice()+JumpingStopPips*Point);


As an example, for a buy:

Initial SL is 200 pips away, JumpingStopPips = 50. Until the first jump, sl in our calculation will also be JumpingStopPips below OrderOpenPrice, or 50 pips below the open price. Once it moves 2 * JumpingStopPips, or 100 pips beyond the sl (in our calculation not the real one) price will be +50 pips and we do our first jump (which puts us at Breakeven)

Of course, we lose the BE+2 pips that the strategy requires, so the fix doesn't help us. :D
All times are UTC Page 20 of 71