3D ADX + OSMA Crossover - Need Help with code - page 2

 
8284:

The book and documentation are there for anybody to read. If OP asks a question it obviously means that he needs a little more help. He asked a question and V answered by directing him to where the answers could be found. I have no problem with that, Im only saying V could have offered an explanation as well to make things easier not only for OP but for everyone else who would read this thread.

Some people here just assume that everyone has a background in programming. Unfortunately this is not true and I am a good example of that. I learnt mql with absolutely no prior programming knowledge. It took me about two weeks of near madness just to understand concepts some people here take for granted. I had obviously read the book, yet some things still eluded my comprehension. Reading the OP reminded me of those days when I was trying to get help from this forum. Some people helped, others didnt.

There is nothing wrong with Viffers post, Im just saying that sometimes simply referring a person to the documentation is of little help.


Hmm.... this is OP's third post this week asking for coding. They have all gone unanswered until I commented... where were you then? This has got nothing to do with an assumed background in programming... After a 3rd request for someone to code his system, this thread is all about self sufficiency. Clearly, OP has NOT read the book.

Telling him && means and isn't particularly helpful imho. Better to show him the page of the book that tells him

&& AND (logical conjunction) x == 3 && y < 5 TRUE(1), if all values are true

as well as info on lots of other expressions like ++, || and %=.

I then show him MODE_MAIN is an identifier... and so are all the other identifiers on the page and they get used in functions like [and linked iADX] and by the way, here is a list of all the other functions in a format far easier than the book provides. That is a far deeper level of help than && means and.


And just for the record, I registered in January and before that had never programmed anything in my life so I understand your position. If OP's question was " I've read [link] but still don't understand how && is used. I've used it like {....some incorrect code...}, can you tell me what's wrong." Then OP is going to get the fullest explanation I can provide. But the question is rudimentary, therefore so is the answer.

V

 
Viffer:

Hmm.... this is OP's third post this week asking for coding. They have all gone unanswered until I commented... where were you then? This has got nothing to do with an assumed background in programming... After a 3rd request for someone to code his system, this thread is all about self sufficiency. Clearly, OP has NOT read the book.

Telling him && means and isn't particularly helpful imho. Better to show him the page of the book that tells him

&& AND (logical conjunction) x == 3 && y < 5 TRUE(1), if all values are true

as well as info on lots of other expressions like ++, || and %=.

I then show him MODE_MAIN is an identifier... and so are all the other identifiers on the page and they get used in functions like [and linked iADX] and by the way, here is a list of all the other functions in a format far easier than the book provides. That is a far deeper level of help than && means and.


And just for the record, I registered in January and before that had never programmed anything in my life so I understand your position. If OP's question was " I've read [link] but still don't understand how && is used. I've used it like {....some incorrect code...}, can you tell me what's wrong." Then OP is going to get the fullest explanation I can provide. But the question is rudimentary, therefore so is the answer.

V

Ok !
 
8284:

Please guys, can we be a little more helpful? jimtrader1 needs explanations and not curt replies and links.

&& simply means "and".

For example

if (OsMA_Previous <= 0 && OsMA_Current > 0)-

if (OsMA_Previous <= 0 "and" OsMA_Current > 0)-

get it?



Thank you very much. This is just what I needed. The link example just didn't make it clear enough to me. I took an HTML course and got an A on it. This stuff is really something!

JimTrader1

 
jimtrader1:


Thank you very much. This is just what I needed. The link example just didn't make it clear enough to me. I took an HTML course and got an A on it. This stuff is really something!

JimTrader1


lol... well I'm glad you got your answer.


I notice HTML just uses a single '&' for conditional operators and I see it uses a single '|' for OR. Just to help out, in MQL4 you would use 2 bars like this '||' for OR. Hmmm... and mq4's method for > or < is totally different... I'm glad I don't have to code in html.

Anyway, hope that helps

V


Microsofts HTML Tutorial:


The following table describes the operators that can be used to create conditional expressions.

Item Example Comment
![if !IE]The NOT operator. This is placed immediately in front of the feature, operator, or subexpression to reverse the Boolean meaning of the expression.
lt[if lt IE 5.5]The less-than operator. Returns true if the first argument is less than the second argument.
lte[if lte IE 6]The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument.
gt[if gt IE 5]The greater-than operator. Returns true if the first argument is greater than the second argument.
gte[if gte IE 7]The greater-than or equal operator. Returns true if the first argument is greater than or equal to the second argument.
( )[if !(IE 7)]Subexpression operators. Used in conjunction with boolean operators to create more complex expressions.
&[if (gt IE 5)&(lt IE 7)]The AND operator. Returns true if all subexpressions evaluate to true
|[if (IE 6)|(IE 7)]The OR operator. Returns true if any of the subexpressions evaluates to true.
 
Viffer:
I notice HTML just uses a single '&' for conditional operators and I see it uses a single '|' for OR. Just to help out, in MQL4 you would use 2 bars like this '||' for OR. Hmmm... and mq4's method for > or < is totally different...

MQ4 has Boolean operations (&&, ||) and Bitwise operations (&, |)

Reason: