EWOCCI Method and EA - page 7

 
davidke20:
David,

You can code it this way, so it will work with both normal EURUSD account and EURUSDm accounts.

{

if (Symbol()!=("EURUSDm" || "EURUSD" || "EURUSD."))

Alert ( "We are not on EURUSD. Please place me on eurousd. ");

}

EURUSDm=IBFX Nano account

EURUSD=normal account

EURUSD.=CrownFX

Regards

David(davidke20)

'||' - condition cannot be a string C:\Program Files\FXDD LIVE#3\experts\EWOCCI_Cross_Daily.mq4 (154, 28)

I got this error on the suggested code. Any ideas?

thanks for the suggestion, I'll play with it a bit, and see if I can get it right

edit: any way to get it to check one at a time, if 1 matches, the others are ignored.?

Dave

 
xxDavidxSxx:
'||' - condition cannot be a string C:\Program Files\FXDD LIVE#3\experts\EWOCCI_Cross_Daily.mq4 (154, 28)

I got this error on the suggested code. Any ideas?

thanks for the suggestion, I'll play with it a bit, and see if I can get it right

edit: any way to get it to check one at a time, if 1 matches, the others are ignored.?

Dave

{

if (Symbol()!=("EURUSDm")

{

Alert ( "We are not on EURUSD. Please place me on eurusd. ");

return;

}

else

{if(Symbol()!=("EURUSD")

{Alert ( "We are not on EURUSDm. Please place me on eurusd. ");

return;

}

}

}

What about this?

Regards

David

 

Ok try this one guys

thanks David for your help

Dave

 
xxDavidxSxx:
Ok try this one guys

thanks David for your help

Dave

Hi xxDavidxSxx,

now the last last version will working on FXDD or the first only, or...

Please, can u post ur resolts graf from live trade on FXDD or give link to it?

Lots thanks

Marko

 
xxDavidxSxx:
'||' - condition cannot be a string C:\Program Files\FXDD LIVE#3\experts\EWOCCI_Cross_Daily.mq4 (154, 28)

I'll answer to this.

|| means OR

after OR we start a new condition.

That means the correct way of writing it would be:

{

if (Symbol()!="EURUSDm" || Symbol()!= "EURUSD" || Symbol()!= "EURUSD.")

Alert ( "We are not on EURUSD. Please place me on eurousd. ");

}

If you simply write || "EURUSD" MT4 compiler will think EURUSD is a condition as it is. But the only parameter I know of that can be a condition is a bool parameter (True or False). Since symbol is string, you get an error, saying string cannot be a condition. Its easy if you know few basics.

So please remember, after you write || you have to do the check from the beginning.

xxDavidxSxx

Please put the newest version to the first page not to confuse people.

Please include "last update date" on the first post as well because I'm even more confused after reading few pages

-edit-

I just backtested the EA a few times. Looks promising with 100% wins (98% sometimes) but looks scary with 50% drawdown. I backtested with 2 lots and on 2006-2008. It gave me 100% wins with 50% drawdown (equity drawdown). If you backtest with small lots, its good. It gives you no loss or very little amount of loss.

But in order to trade this, we'll have to use like 28 EAs for all currency pairs. This way we'll at least have some profit.

 
Shinigami:
I'll answer to this.

|| means OR

after OR we start a new condition.

That means the correct way of writing it would be:

{

if (Symbol()!="EURUSDm" || Symbol()!= "EURUSD" || Symbol()!= "EURUSD.")

Alert ( "We are not on EURUSD. Please place me on eurousd. ");

}

If you simply write || "EURUSD" MT4 compiler will think EURUSD is a condition as it is. But the only parameter I know of that can be a condition is a bool parameter (True or False). Since symbol is string, you get an error, saying string cannot be a condition. Its easy if you know few basics.

So please remember, after you write || you have to do the check from the beginning.

xxDavidxSxx

Please put the newest version to the first page not to confuse people.

Please include "last update date" on the first post as well because I'm even more confused after reading few pages

-edit-

I just backtested the EA a few times. Looks promising with 100% wins (98% sometimes) but looks scary with 50% drawdown. I backtested with 2 lots and on 2006-2008. It gave me 100% wins with 50% drawdown (equity drawdown). If you backtest with small lots, its good. It gives you no loss or very little amount of loss.

But in order to trade this, we'll have to use like 28 EAs for all currency pairs. This way we'll at least have some profit.

Thanks, I'll remember that.

The back tests don't account for manual closing of a trade after the ewocci day is over. Thats what I did sunday. I closed last open order at +2 pips. Missed out on 23 pips but no chance of reversal and leaving an order open.

But it will be discretionary. I won't always do that.

edit: also I was just waiting to see of the error reoccurs befor updating first post. If its working on IBFX now with no error I can update it.

Dave

 

There is a small logic flaw in the code fragment above. The correct logic is

if (Symbol()!="EURUSDm" && Symbol()!= "EURUSD" && Symbol()!= "EURUSD.")

Alert ( "We are not on EURUSD. Please place me on eurousd. ");

 
tururo:
There is a small logic flaw in the code fragment above. The correct logic is

if (Symbol()!="EURUSDm" && Symbol()!= "EURUSD" && Symbol()!= "EURUSD.")

Alert ( "We are not on EURUSD. Please place me on eurousd. ");

Ah...Thats correct! Senior coder is always sharper then us

Regards

David

 

Just a quick post to get this moved back to the first page.

trades come so far apart on this ea the thread can get lost in the crowd.

Dave

 

2007.07.25 12:25:41 2007.07.24 22:00 EWOCCI_Cross_Daily_ibfx 2[1].1 GBPUSD,Daily: error0

WHY? I AM USING IBFX