Problem with programing EA with MBFX Sytem and Sell orders

To add comments, please log in or register
Magiceyes2
17
Magiceyes2  

Hi fellows,

I'm currently experiencing an issue for 2 days with an EA that use MBFX system and candles to trade. I don't have a high level on programing with mql4, so I took "OpenTiks" from the CodeBase as base for my EA. Perhaps i missed some codes that were in the original EA and that could explain the problem but i don't know. Actually i have 2 problems :

  1) The EA doesn't seem to get values from MBFX system on backtest. I used iCustom for each of the 7 buffers of the indicator as follow :

double        var1           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,1,0);
double        var2           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,2,0);
double        var3           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,3,0);
double        var4           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,4,0);
double        var5           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,5,0);
double        var6           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,6,0);
double        var7           = iCustom(NULL,0,"MBFX_System_1",120,3,1.61803399,7,0);

  2) The EA doesn't open Sell trades but only Buy orders. I used this one code to configurate :

bool BuyOp=false;
bool SellOp=false;

if (Close[2]<var6&&Close[2]>var7&&High[2]<High[1]&&Close[2]<Close[1]&&High[1]<(var6+0.5*(var5-var6))) BuyOp=true;
if (Close[2]<var4&&Close[2]>var3&&Low[2]>Low[1]&&Close[2]>Close[1]&&Low[1]>(var3-0.5*(var3-var2)))   SellOp=true;

Well maybe it will sound easy for some of you but as mentioned previously i am not a great coder, not yet at least. So if you guys have some suggestions to make, i'd highly appreciate them. Thank you in advance.

Files:
mntiwana
4557
mntiwana  
Magiceyes2:

Hi fellows,

I'm currently experiencing an issue for 2 days with an EA that use MBFX system and candles to trade. I don't have a high level on programing with mql4, so I took "OpenTiks" from the CodeBase as base for my EA. Perhaps i missed some codes that were in the original EA and that could explain the problem but i don't know. Actually i have 2 problems :

  1) The EA doesn't seem to get values from MBFX system on backtest. I used iCustom for each of the 7 buffers of the indicator as follow :

  2) The EA doesn't open Sell trades but only Buy orders. I used this one code to configurate :

Well maybe it will sound easy for some of you but as mentioned previously i am not a great coder, not yet at least. So if you guys have some suggestions to make, i'd highly appreciate them. Thank you in advance.

I think MBFX indicator is old jurik rsx,try finding newest rsx with source code and see exact the iCustom values

William Roeder
20228
William Roeder  
Magiceyes2: . I used iCustom for each of the 7 buffers of the indicator as follow :

No you didn't. If there are 7 buffers, their indexes are [0 … 6]

To add comments, please log in or register