HELP WITH ERROR 4107

fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 4107

Post by fxdaytrader »

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) )
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: HELP WITH ERROR 4107

Post by fxdaytrader »

:) - so the PM is obsolete now?

edit: oops, PN = Private Nachricht, should be PM = Private Message ...
Last edited by fxdaytrader on Fri Sep 20, 2013 8:51 am, edited 1 time in total.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

fxdaytrader wrote::) - so the PN is obsolete now?
Sorry, what is PN :?:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

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 :?:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP WITH ERROR 4107

Post by fx800 »

Your help is needed here please

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

:oops:

Only when you can spare the time.
Post Reply

Return to “Coders Hangout”