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 Sat May 11, 2024 12:45 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Moving Average Levels put into EA code?
PostPosted: Sun Mar 04, 2012 3:01 am 
Offline

Joined: Thu Feb 03, 2011 3:43 am
Posts: 3
I can set Moving Average Levels on my charts in the dialog box settings,
so how do I program the MA Levels into an EA lines of code?

To Buy when Price is between the MA Level values of up +20 and +40.
To Sell when Price is between the MA Level values of down -20 and -40.

How?


Top
 Profile  
 
 Post subject: Re: Moving Average Levels put into EA code?
PostPosted: Sun Mar 04, 2012 5:51 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
If you post the indicator mq4 file, I'll tell you if it's possible. Are you trying to do this: http://forum.mql4.com/23815? If so, go here and download the MAChannel indie: http://www.forexfactory.com/showthread.php?t=92106. Specify each Pip_Offset +/- MA in the inputs and set TA conditions accordingly. Multiple TA's should function as multiple bands if set properly. Offsets are actually in points, not pips when used with 5 digit pricing. It's hard coded as an SMA (0), so if you want EMA(1), SMMA(2), etc. you will have to edit the MA type in MetaEditor.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: Moving Average Levels put into EA code?
PostPosted: Thu Mar 08, 2012 3:16 am 
Offline

Joined: Thu Feb 03, 2011 3:43 am
Posts: 3
Rjo
You are right.
I copied my questions from "http://forum.mql4.com/23815" and pasted here.
I appreciate your help.

(* I haven't installed Molanis Stratedy builder yet.)


Top
 Profile  
 
 Post subject: Re: Moving Average Levels put into EA code?
PostPosted: Wed Mar 14, 2012 6:45 pm 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
tora wrote:
I can set Moving Average Levels on my charts in the dialog box settings,
so how do I program the MA Levels into an EA lines of code?

To Buy when Price is between the MA Level values of up +20 and +40.
To Sell when Price is between the MA Level values of down -20 and -40.

How?



A Level, when used in MT4 with a iMA, is nothing more than a prescribed distance from the iMA itself. I believe that in MT4, the Level's line is draw at a ratio of: 10:1. So, if you set a Level on the iMA at say +400, then you are really saying that you want to draw a mirrored MA with a distance of 40 pips above the real mode iMA. Consequently, setting the level at -400, puts the mirrored MA below the real mode iMA, at a distance of -40 pips.

I have another post that will address something similar. I don't want to steer this one too far off its intended course.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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