Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information
Hi
I am so sorry if my question is very basic.
I am learing mql4.
Please help me how to express this math conditions in mql4:
IF( (A>B) AND (|X| <1) AND (Y<Z) ) then.. ... ... ...
|X| is absoulute; it means (X < -1) OR (X> 1)
I got messege from MetaEditor
" IF EXPRESSION IS TOO COMPLEX"
After many times trying,... I have no more Idea..So please tell me how to..
Thanks
Hi
I am so sorry if my question is very basic.
I am learing mql4.
Please help me how to express this math conditions in mql4:
IF( (A>B) AND (|X| <1) AND (Y<Z) ) then.. ... ... ...
|X| is absoulute; it means (X < -1) OR (X> 1)
I got messege from MetaEditor
" IF EXPRESSION IS TOO COMPLEX"
After many times trying,... I have no more Idea..So please tell me how to..
Thanks
I am not a coder.
I studied Codersguru lessons together with everybody: it was one time when Codersguru was posting his lessons live (in real time) on this forum and many people (together with me) studied this lessons.
I remember that && is and. || is or.
And be cafully with ;, { and } and ( and ).
Also be cafuly with the point and number (just a number - 70,or 100, 0r -100, or 30, or whatever) because it should be coded in different way (don't remember now sorry).
Hi
I am so sorry if my question is very basic.
I am learing mql4.
Please help me how to express this math conditions in mql4:
IF( (A>B) AND (|X| <1) AND (Y<Z) ) then.. ... ... ...
|X| is absoulute; it means (X < -1) OR (X> 1)
I got messege from MetaEditor
" IF EXPRESSION IS TOO COMPLEX"
After many times trying,... I have no more Idea..So please tell me how to..
Thanks
Try this:
if((a>b && MathAbs(x)<1) && y<z)
{
//write here what should happen
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................
Is there anyway to make your EA run an Optimization and automatically adjust the settings everyday.
I would like to run a 30 day profit factor optimization for 16 parameters. and have it just apply the settings before the it starts trading again. It shuts down automatically everyday for about 8 hours. this would be a perfect time to run it...
anyone know how to code it... It would bring it from the Great EA level to the Insanley profitable AI level...
This could also be good code for everyone to use in there EA's markets adjust constantally why shouldent our EA's get smarter.
I also posted this in the EA fourm, dident know about this one until now..
Is it possible to create bar indicators in separate windows like the indicator in the pic i have posted [dont know what they are officially called] for say a red bar if the MACD crosses negative and stays red if in negative zones and green if crosses positive etc etc. Also is it possible to create the same bar indicator windows for say if the price goes below a moving average.
if this seems a daft question please bear with me. When i look at indicators on a chart i tend to try and anticipate what the price will do so im looking to try and have separate window indicators which when all show the same colour i will trade. [Psychology reasons]. Is the creation of these separate bar type indicators something i could learn to create , im far from a programmer in any language.
Hi
I am so sorry if my question is very basic.
I am learing mql4.
Please help me how to express this math conditions in mql4:
IF( (A>B) AND (|X| <1) AND (Y<Z) ) then.. ... ... ...
|X| is absoulute; it means (X < -1) OR (X> 1)
I got messege from MetaEditor
" IF EXPRESSION IS TOO COMPLEX"
After many times trying,... I have no more Idea..So please tell me how to..
Thanks
if(a>b && (x < -1 || x > 1) && y<z){
;your code
}
or maybe x == 0 instead of (x < -1 || x > 1) because only way MathAbs(x) < 1 is true when x=0 http://docs.mql4.com/basis/operations/bool
on the other thought maybe you simply need this:
if(a>b && x<1 && y<z)
or this
if(a>b && x<-1 && y<z)
since x is never 0 or -1 according to your definition
I am confused by your definition of absolute value
Is it possible to create bar indicators in separate windows like the indicator in the pic i have posted [dont know what they are officially called] for say a red bar if the MACD crosses negative and stays red if in negative zones and green if crosses positive etc etc. Also is it possible to create the same bar indicator windows for say if the price goes below a moving average.
if this seems a daft question please bear with me. When i look at indicators on a chart i tend to try and anticipate what the price will do so im looking to try and have separate window indicators which when all show the same colour i will trade. [Psychology reasons]. Is the creation of these separate bar type indicators something i could learn to create , im far from a programmer in any language.
any advice would be greatly appreciated.
dh
I am not sure if this will answer your question but, try it
Just put the indicators on top of each other on the chart , I mean add it more than once and change the setting and you will have what you want I hope
Is it possible to create bar indicators in separate windows like the indicator in the pic i have posted [dont know what they are officially called] for say a red bar if the MACD crosses negative and stays red if in negative zones and green if crosses positive etc etc. Also is it possible to create the same bar indicator windows for say if the price goes below a moving average.
if this seems a daft question please bear with me. When i look at indicators on a chart i tend to try and anticipate what the price will do so im looking to try and have separate window indicators which when all show the same colour i will trade. [Psychology reasons]. Is the creation of these separate bar type indicators something i could learn to create , im far from a programmer in any language.
any advice would be greatly appreciated.
dh
Yes, this is possible.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................
Is it possible to create bar indicators in separate windows like the indicator in the pic i have posted [dont know what they are officially called] for say a red bar if the MACD crosses negative and stays red if in negative zones and green if crosses positive etc etc. Also is it possible to create the same bar indicator windows for say if the price goes below a moving average.
if this seems a daft question please bear with me. When i look at indicators on a chart i tend to try and anticipate what the price will do so im looking to try and have separate window indicators which when all show the same colour i will trade. [Psychology reasons]. Is the creation of these separate bar type indicators something i could learn to create , im far from a programmer in any language.
any advice would be greatly appreciated.
dh
Here you are exactly what you want, load all 4 of the same indicator on one chart all with different settings as shown below, when all red sell, when all blue buy.
settings
set first for 15 minutes
second 30 mins
third 60 mins
forth 140 mins