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

HELP WITH ERROR 4107
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2914
Page 15 of 18
Author:  fx800 [ Mon Sep 16, 2013 8:45 pm ]
Post subject:  Re: HELP WITH ERROR 4107

I got caught out again a second time, and was wondering why the latest version has not sent a single trade today.

The reason : the SendAlertNotTrade was set to true by default. Most of the ea in the forum are for demo first, hence for most of them, the default would be false.

Code: Select all

 extern bool     SendAlertNotTrade=true; //false;
Just in case anyone else is having the same problem.
Author:  fx800 [ Mon Sep 16, 2013 11:40 pm ]
Post subject:  Re: HELP WITH ERROR 4107

fx8000 wrote:I got caught out again a second time, and was wondering why the latest version has not sent a single trade today.

The reason : the SendAlertNotTrade was set to true by default. Most of the ea in the forum are for demo first, hence for most of them, the default would be false.

Code: Select all

 extern bool     SendAlertNotTrade=true; //false;
Just in case anyone else is having the same problem.
Some trades at last !

:lol: :lol: :lol:
Author:  fx800 [ Tue Sep 17, 2013 10:51 am ]
Post subject:  Re: HELP WITH ERROR 4107

Hi Fxdaytrader,

Using your mod ea shell, I am trying to code Bob's 10.6 ea.

It requires the cross of stoch 20 or 40 from below for buy, and stoch 80 or 60 from above for sell.

I am adding the following code to the ReadIndicatorValues

StochVal = GetStochastic(0);
StochVal1 = GetStochastic(1);

StochCrossStatus = stochcrossnone;
if (StochVal1 <= 20 && StochVal > 20 || StochVal1 <= 40 && StochVal > 40) StochCrossStatus = stochcrosslong;//stoch cross above 20 from below or stoch cross above 40 from below

if (StochVal1 >= 80 && StochVal < 80 || StochVal1 >= 60 && StochVal < 60) StochCrossStatus = stochcrossshort;//stoch cross below 80 from above or stoch cross below 60 from above

Is the || OR operator used correctly ?

Thanks.
Author:  fxdaytrader [ Tue Sep 17, 2013 12:07 pm ]
Post subject:  Re: HELP WITH ERROR 4107

fx8000 wrote:Is the || OR operator used correctly ?
not 100% sure, I would separate it by () ..., so instead of

Code: Select all

if (StochVal1 <= 20 && StochVal > 20 || StochVal1 <= 40 && StochVal > 40)
if would code it that way:

Code: Select all

if ( (StochVal1 <= 20 && StochVal > 20) || (StochVal1 <= 40 && StochVal > 40) )
Author:  fx800 [ Tue Sep 17, 2013 12:43 pm ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:
fx8000 wrote:Is the || OR operator used correctly ?
not 100% sure, I would separate it by () ..., so instead of

Code: Select all

if (StochVal1 <= 20 && StochVal > 20 || StochVal1 <= 40 && StochVal > 40)
if would code it that way:

Code: Select all

if ( (StochVal1 <= 20 && StochVal > 20) || (StochVal1 <= 40 && StochVal > 40) )
Thanks, I will try this and see what happens.
Author:  fx800 [ Thu Sep 19, 2013 8:00 pm ]
Post subject:  Re: HELP WITH ERROR 4107

fx8000 wrote:
fxdaytrader wrote:
fx8000 wrote:Is the || OR operator used correctly ?
not 100% sure, I would separate it by () ..., so instead of

Code: Select all

if (StochVal1 <= 20 && StochVal > 20 || StochVal1 <= 40 && StochVal > 40)
if would code it that way:

Code: Select all

if ( (StochVal1 <= 20 && StochVal > 20) || (StochVal1 <= 40 && StochVal > 40) )
The code snippet works.

Thanks.
Author:  fxdaytrader [ Thu Sep 19, 2013 9:22 pm ]
Post subject:  Re: HELP WITH ERROR 4107

:) - so the PM is obsolete now?

edit: oops, PN = Private Nachricht, should be PM = Private Message ...
Author:  fx800 [ Fri Sep 20, 2013 8:39 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote::) - so the PN is obsolete now?
Sorry, what is PN :?:
Author:  fx800 [ Fri Sep 20, 2013 9:44 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote::) - so the PM is obsolete now?

edit: oops, PN = Private Nachricht, should be PM = Private Message ...
I see ;)

The PM is not obsolete.

For some reason, the ea I sent you is still not sending any trades, must be some bugs :?:
Author:  fx800 [ Fri Sep 20, 2013 10:14 am ]
Post subject:  Re: HELP WITH ERROR 4107

Your help is needed here please

http://www.stevehopwoodforex.com/phpBB3 ... 138#p76138

:oops:

Only when you can spare the time.
All times are UTC Page 15 of 18