Jump to content

[ASK] How to code an indicator to an ea?


Recommended Posts

Hi there, I have favour to ask from my fellow friends in II. How to code a simple indicator involving 2 ema to an expert advisor?

 

The layout would be as follow

 

 

if MA1>MA2 then buy the high and buy the low

 

if MA1<MA2 then sell the low and sell the high

 

The buying or selling will be done by the ea...

 

any helpers...thanks in advance...

Link to comment
Share on other sites

I dont know much about mql coding, but if your system involves just MA's then you can use the following code

 

Hi there, I have favour to ask from my fellow friends in II. How to code a simple indicator involving 2 ema to an expert advisor?

 

The layout would be as follow

 

 

if MA1>MA2 then buy the high and buy the low

 

if MA1<MA2 then sell the low and sell the high

 

The buying or selling will be done by the ea...

 

any helpers...thanks in advance...

Link to comment
Share on other sites

MACD can help you to detect range, it will depend on the time frame, i will post some examples soon, wait..thx)))

Thanks guys...I've already solved the indicator involving the [email protected] you are right..its just for a confimation whether the price is on a uptrend or downtrend only...although I might have a problem about how to distinguish price that is trending or ranging...any good indicator for range market?...thanks
Link to comment
Share on other sites

Something like this, u can google this, i also saw this suggestion somewhere on the net.

http://imageshack.us/f/822/rangevf.jpg/

http://imageshack.us/photo/my-images/822/rangevf.jpg/

 

Yes Something like that...Jay my man where or how to get that type of indicator? Is it really just MACD?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...