3D ADX + OSMA Crossover - Need Help with code

 

This 3 ADX and 2 OSMA signal works better than many setups I have seen in the past. I feel it has Great potential if put in an EA form. I really want to do this soon.Problem is I am still learning the code. I am not there yet. In my first message I listed the inputs and variables of ADX and OSMA indicators. In the second message I sent a screen shot to make the whole thing a lot clearer.

If someone could give me an idea of how long or what time would this involve to make a basic program with this. A simple OSMA crossover of the 2 OSMA'S should give good signals.(YELLOW SHOWS ON BAR) This would be a nice start for this.

Would like to get this started as soon as possible. I am learning some of the code and program but have a ways to go.

Thanks,

Jim C.

 

I've seen your posts and we are willing to help. But our help is going to be restricted to specific questions you encounter during you learning... Your posts at the moment appear to me to be asking for someone to do it for you for free. If that's the case, that's not cool around here. If you are stuck on a specific aspect of your code, please let us know the specifics and we will be happy to help.

I assume you've seen the book.

V

 

2 weeks of going through the book and you would be able to code that. Well at least enough to run it in back-tests. https://book.mql4.com//. I would however go as far as Programming in MQL4. IMO you want to practice writing some simple codes before you read the entire book.

The break through for me when attempt to code cross over like that was something like this:

OsMA_Current=iOsMA(NULL,0,12,26,9,PRICE_OPEN,0);

OsMA_Previous=iOsMA(NULL,0,12,26,9,PRICE_OPEN,1);

ADX_Current=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0);

ADX_Previous=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,1);

if (OsMA_Previous <= 0 && OsMA_Current > 0)------>This means Osma cross over 0.

If you already understand what the above codes are saying then you're closer to coding that simple EA than you think.

 
No slaves here, either learn mql4 or pay someone.
 
Viffer:

I've seen your posts and we are willing to help. But our help is going to be restricted to specific questions you encounter during you learning... Your posts at the moment appear to me to be asking for someone to do it for you for free. If that's the case, that's not cool around here. If you are stuck on a specific aspect of your code, please let us know the specifics and we will be happy to help.

I assume you've seen the book.

Viffer, I don't expect anyone to do this for nothing. That's why I asked about the time it would take. I can't however pay $150 per hr.. This is what FXCM gets in their coding department. Sorry about any misunderstanding. Somebody just sent me a little code related to this. This will help me.


Jim C.

 
ubzen:

2 weeks of going through the book and you would be able to code that. Well at least enough to run it in back-tests. https://book.mql4.com//. I would however go as far as Programming in MQL4. IMO you want to practice writing some simple codes before you read the entire book.

The break through for me when attempt to code cross over like that was something like this:

OsMA_Current=iOsMA(NULL,0,12,26,9,PRICE_OPEN,0);

OsMA_Previous=iOsMA(NULL,0,12,26,9,PRICE_OPEN,1);

ADX_Current=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0);

ADX_Previous=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,1);

if (OsMA_Previous <= 0 && OsMA_Current > 0)------>This means Osma cross over 0.

If you already understand what the above codes are saying then you're closer to coding that simple EA than you think.

 
Viffer:

I've seen your posts and we are willing to help. But our help is going to be restricted to specific questions you encounter during you learning... Your posts at the moment appear to me to be asking for someone to do it for you for free. If that's the case, that's not cool around here. If you are stuck on a specific aspect of your code, please let us know the specifics and we will be happy to help.

I assume you've seen the book.

Viffer, I don't expect anyone to do this for nothing. That's why I asked about the time it would take. I can't however pay $150 per hr.. This is what FXCM gets in their coding department. Sorry about any misunderstanding. Somebody just sent me a little code related to this. This will help me.

ubzen:

2 weeks of going through the book and you would be able to code that. Well at least enough to run it in back-tests. https://book.mql4.com//. I would however go as far as Programming in MQL4. IMO you want to practice writing some simple codes before you read the entire book.

The break through for me when attempt to code cross over like that was something like this:

OsMA_Current=iOsMA(NULL,0,12,26,9,PRICE_OPEN,0);

OsMA_Previous=iOsMA(NULL,0,12,26,9,PRICE_OPEN,1);

ADX_Current=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0);

ADX_Previous=iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,1);

if (OsMA_Previous <= 0 && OsMA_Current > 0)------>This means Osma cross over 0.

If you already understand what the above codes are saying then you're closer to coding that simple EA than you think.


I understand this pretty well. What does the MODE_MAIN mean? Also the && that I see quite often?

Very much appreciate you putting this on a post. I'll see what I can do with it.


Jim C.

 

&& = Boolean operations symbols.

https://book.mql4.com/basics/expressions

Mode_Main = Indicator line identifier.

https://docs.mql4.com/constants/lines

Needed for paramaters in ...

https://docs.mql4.com/indicators/iADX

List of functions...

https://www.mql5.com/en/forum/122679

V

 
jimtrader1:
I understand this pretty well. What does the MODE_MAIN mean? Also the && that I see quite often?

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?

 

V is obviously attempting to assist the OP in learning how to answer his own questions for future reference...do you really aim to be critical of people who are spending their time here attempting to assist others for free? Hooray! Let's critique the quality of the free help... :(

 
1005phillip:

V is obviously attempting to assist the OP in learning how to answer his own questions for future reference...do you really aim to be critical of people who are spending their time here attempting to assist others for free? Hooray! Let's critique the quality of the free help... :(

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.

Reason: