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 Wed May 15, 2024 11:55 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: MACD Histogram
PostPosted: Mon May 16, 2011 1:22 am 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
I am trying the program out and I wish some can explain to me what MODE_SIGNAL and MODE_MAIN are in iMACD indicator.

Moreover, I want to create a TA which checks that the current price is either in negative MACD historgram or positive. My point here is that I am creating a strategy which buys or sells on 2 moving average, but also buys when MACD historgram is positive and sells when MACD histogram is negative.

someone can help?


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Mon May 16, 2011 9:10 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
To start read this to understand waht a mode is ... viewtopic.php?f=3&t=162
Doing a quick serach in the forum I got this about macd:
viewtopic.php?f=2&t=250&p=932&hilit=macd#p932
viewtopic.php?f=9&t=272&p=1022&hilit=macd#p1022
viewtopic.php?f=6&t=237&p=874&hilit=macd#p874
Check the examples mentioned in the posts.
To combine macd and ma you need to use the AND icon. In the macd condition you can compare to a user defined number (maybe 0 will work in your case)


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Mon May 16, 2011 12:08 pm 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
Thanks for your reply. unfortunately I cannot download the EAs in this link: http://www.molanis.com/products/molanis ... rs-for-mt4

The links are broken.

One more thing, the EA is always opening new positions, it doesn't wait for the indicators to come true. Do you know why?


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Mon May 16, 2011 12:19 pm 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
What i really wish is that when the 2 moving averages cross the position is opened only at that moment according to the MACD historgram.

What i did is when faster MA crosses slower MA it buys and vice versa. But it keeps on buying after the s/l or trailing stop is reached. Is there a way to open a trade only on MA cross over?


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Mon May 16, 2011 3:09 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Links are not broken. If you click on the link it will show the content of the file for the strategy builder. You just need to save it - go to file - save
Or you can right click on top of the link and select save as
When you get the files, you can see the difference between a simple ma condition and a cross over condition. I think you are using a simple ma condition so you get many positions opened. To add the macd just add another TA icon connected to the AND.


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Tue May 17, 2011 7:11 am 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
Yep I got it. Thanks a lot your examples are really help full. But i cannot figure out or i don't know if it is possible to check more then 2 TAs for a buy or sell signal.

I want for example a signal on crossover until 6 bars pass. Thus I am already using 2 TAs as shown in the MAs crossover Example 5. but what if I want to add another indicator before I buy or sell the signal. Is it possible with this program?


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Tue May 17, 2011 9:07 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You could connect more TAs to the AND. However you are evaluating signals at the same time - Not in the same bar though.
So you have two TAs that make the cross over, add another one that tells you if the macd > 0 in the current bar (or was macd>0 when the bar closed. Use shift = 1)


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Tue May 17, 2011 3:19 pm 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
mah! i feel really stupid coz i still don't get it :/ .. I am now testing 3 TAs connected to one AND.

I have a TA with MA cross over
TA with the same cross over with different shift
TA with moving average and price (bid above MA for buy signal, bid below MA for sell signal)

and when testing the EA buy and selling signal are still done regardless if the price is above the last MA or below. both selling and buying is done according to the first 2 TAs mentioned but not according to the last TA mentioned.


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Tue May 17, 2011 10:37 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Please post your strategy file (.mol file) and a detailed description of the ea (when to buy, when to sell)
BTW ma1>ma2 is not a cross over. A cross over needs to evaluate 2 bars. One TA will do ma1>ma2 which is not a cross over. You need two TA joined by an AND to create a crossover (as shown in the examples)


Top
 Profile  
 
 Post subject: Re: MACD Histogram
PostPosted: Wed May 18, 2011 12:23 am 
Offline

Joined: Mon May 16, 2011 1:16 am
Posts: 8
Hmm i think i got it all wrong then!

I'm trying to create a strategy with 4 TAs for the sake to discover the capability of this program and to understand how it works.

Lets take a long example.

When a fast MA crosses upwards the slower MA and the position is only available after 4 bars. Moreover, for a long signal, the price has to be above another slower MA and MACD histogram has to be Positive.

The system is reversed for a short signal.

I hope I have explained the strategy well. Here you have the file that I tried to build for the strategy explained.

Loads of thanks for your kind support!


Attachments:
File comment: .mol file
xstrategy.mol [14.79 KiB]
Downloaded 528 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

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