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

Simple Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3154
Page 7 of 13
Author:  FXTrucker [ Wed Sep 25, 2013 9:38 pm ]
Post subject:  MA Stacking filter opened a trade

nzdchf-MAStack open.png
The demo with the MA Stacking filter enabled opened a trade but it looks like it should not have. I think it occurred when I was on the VPS and had been turning the EA's on and off to check the settings. It may be a feature of Empty4. It is interesting to note that none my other demos opened this trade.
Author:  SteveHopwood [ Wed Sep 25, 2013 10:01 pm ]
Post subject:  Re: MA Stacking filter opened a trade

FXTrucker wrote:
nzdchf-MAStack open.png
The demo with the MA Stacking filter enabled opened a trade but it looks like it should not have. I think it occurred when I was on the VPS and had been turning the EA's on and off to check the settings. It may be a feature of Empty4. It is interesting to note that none my other demos opened this trade.
Nice one again. You are proving your worth quickly here. Thanks.

Ok, a couple of really bog-basic infantile bloops. I will post fixes for the codephobic (do lose this status soon, won't you?) in the morning.

In the meantime, find this line of code:
if (!MaStackStatus != stacklong)

and replace it with:
if (MaStackStatus != stacklong)
notice the absence of the coloured shriek ?

Then find
if (!MaStackStatus != stackshort)
and replace it with

if (MaStackStatus != stackshort)

and recompile.

:D
Author:  FXTrucker [ Wed Sep 25, 2013 10:21 pm ]
Post subject:  Stochastic values- open trade on either a pull back or break

SteveHopwood wrote:Interesting. I disabled CSS this morning and now I have 11 open trades, with a few of them at BE +10. The whole basket is c. 200 pips up as I write this.

So, the only filters I have are the 240 MA and Stoch moving in the right direction and >20 for buys and <80 for sells.

I will leave the trades running and see what happens.

:D

That is good news I will disable CSS on all the my demos. It might be useful to run it on a lower time frame like m15 eventually.

Steve, As far as I can tell this program does not use the stochastic values as a filter to determine buys or sells. I think it would be great this EA opened trades after pull backs as well breakouts. Kind of a combination of your waiting to buy or sell EA and waiting to buy or sell the bounce EA. By using the high or low stochastic values it might be possible in conjunction with the existing Stochastic slope filter to do this. I am assuming that having a trade open when stochastic values are in the middle (which is what the EA does now) will produce more losing trades than winning ones. I have a suggestion on how to do this that I am going to try out.

These are the changes I'm making:

In external inputs area:

extern int StochValAbove=70;// changed from StochBuyAbove
extern int StochValBelow=30;// Changed from StochSellBelow
extern bool UseStocValues=true;// added
////////////////////////////////////////////////////////////////////////////////////////
double StochValue;// added for use stock values

In evaluate trade opportunities area:

// Stochastic values- open trade on either a pull back or breakout
// but not "in the middle" in hopes of riding a rebound from a pull back or breakout
// and not a low momentum ranging move
if (UseStocValues == true )
{
StochValue = GetStochastic(0, ModeStoch, 0);
if ( StochValue < StochValAbove && StochValue > StochValBelow )
{
ObjectDelete(buyline);
return;
}// end if ( StochVal < StochValAbove && StochVal > StochValBelow )
}// end if (UseStocValues == true )
Author:  SteveHopwood [ Wed Sep 25, 2013 10:53 pm ]
Post subject:  Re: Stochastic values- open trade on either a pull back or b

FXTrucker wrote: Steve, As far as I can tell this program does not use the stochastic values as a filter to determine buys or sells.
Yes it does. Details in post 1.

:D
Author:  FXTrucker [ Thu Sep 26, 2013 12:03 am ]
Post subject:  Re: Stochastic values- open trade on either a pull back or b

SteveHopwood wrote:
FXTrucker wrote: Steve, As far as I can tell this program does not use the stochastic values as a filter to determine buys or sells.
Yes it does. Details in post 1.

:D
I see where post 1 says that the program is supposed to use these stochastic values to enter buys and sells but I don't find them referenced in the EA's code.

I am a self taught recombinant coder. I learn from other programmers and adapt their programs to my ideas. I have learned much from you and the other coders originally a FF and now here.

When I am trying to read code and learn how something is programed I will often "//" out a variable where it is defined, compile the file and jump to the errors of undefined variables to see where it is used and thus quickly find the module of interest.

When I made these changes:

//extern int StochBuyAbove=20;<<<<<<<<<<<
//extern int StochSellBelow=80;<<<<<<<<<<<

to a copy of simple bob I just down loaded from post 1... I get a good compile with 0 errors and 0 warnings so I assumed that these values are not being used anywhere. :geek: :D

When I visually searched up and down the code I haven't found the these variables in the stochastic slope or open trade sections of this program.

Also the nzdchf buy trade that opened with the MA Stack filter problem I posted a screen shot of should have been filtered out by the fact that the Stochastic was way below 80
Author:  matt_32 [ Thu Sep 26, 2013 7:57 am ]
Post subject:  Re: Simple Bob

I ve applied the fix and it immediately took 2 tades.

Thank you Steve
Author:  SteveHopwood [ Thu Sep 26, 2013 8:50 am ]
Post subject:  Re: Simple Bob

V 1c is in post 1.

FXTrucker is right again. I had forgotten to include consideration of StochBuyAbove/SellBelow in the trading decision, so I have fixed this. 1c includes the fix from last night.

Many thanks FXTrucker.

:D
Author:  SteveHopwood [ Thu Sep 26, 2013 5:35 pm ]
Post subject:  Re: Simple Bob

V 1d is in post 1. From post 1:
Trade stacking
We are learning the power of trade stacking over in the Bob and Shelley Again thread. I have added this function to SB. Read about how this works in the BASA User Guide at http://www.stevehopwoodforex.com/phpBB3 ... 838#p70838
:D
Author:  bgood [ Fri Sep 27, 2013 11:59 am ]
Post subject:  Re: Simple Bob

Applied the fix and four trades.
Author:  RxCape [ Fri Sep 27, 2013 12:05 pm ]
Post subject:  Re: Simple Bob

Man oh Man !!! Having applied the fix, 18 trades have occurred. Current open profit at 2.5% of account balance.
All times are UTC Page 7 of 13