molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Thu May 16, 2024 5:58 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Coding divergence using molanis
PostPosted: Tue Nov 22, 2011 5:45 am 
Offline

Joined: Thu Jan 06, 2011 10:04 am
Posts: 27
Hi,

Can you please explain how I would go about writing up a divergence EA, using either RSI, MACD, CCI, etc. ???

For instance, for a buy:

The current pivot point of the RSI is higher than the previous pivot point; and the current price pivot point is lower than the previous pivot point.

Now the thing is, the last pivot point is undeterminable by the "shift" functionality within the TA. It needs to be something along the lines of within the last 48 (24 or 12) 5min bars.

Can you please explain and give an example of how I would go about writing up a divergence EA?

Cheers,


Top
 Profile  
 
 Post subject: Re: Coding divergence using molanis
PostPosted: Tue Nov 22, 2011 9:38 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You need to build or find an indicator that shows the pivots and then import it into the startegy builder.


Top
 Profile  
 
 Post subject: Re: Coding divergence using molanis
PostPosted: Tue Nov 22, 2011 10:52 am 
Offline

Joined: Thu Jan 06, 2011 10:04 am
Posts: 27
Hi,

Sorry for the confusion. I didn't mean that I need pivot points as indicators.

Basically, just as if one was manual trading using CCI, RSI or MACD on their price chart, and a divergence shows. Please have a look at the attached picture to better understand what I mean.

There are no need for extra indicator/s to be imported. Just the default indicators from MT4.

Please advise how I would go about coding "divergence" using molanis?


Attachments:
RSI divergence.PNG
RSI divergence.PNG [ 25.83 KiB | Viewed 4196 times ]
Top
 Profile  
 
 Post subject: Re: Coding divergence using molanis
PostPosted: Tue Nov 22, 2011 1:00 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You need an indicator that does what the red arrows do - Something like a trend line... After that you need to import it and take the signals.


Top
 Profile  
 
 Post subject: Re: Coding divergence using molanis
PostPosted: Wed Nov 23, 2011 6:28 am 
Offline

Joined: Thu Jan 06, 2011 10:04 am
Posts: 27
OK. So how do I go about coding up a trendline using molanis?


Top
 Profile  
 
 Post subject: Re: Coding divergence using molanis
PostPosted: Wed Nov 23, 2011 9:58 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
In the strategy builder you can create conditions that compare the current and n previous bars to get a basic trend-line. However you need a special kind of trend line, the one that connects two spikes which cannot be created with the builder. Your best bet is to search for such indicator in mql4.com - these kind of signals are so easy to draw but really difficult to implement in an indicator.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009