![advanced get oscillator.mq4 advanced get oscillator.mq4](https://tradingstrategyguides.com/wp-content/uploads/2019/11/Volume-Oscillator-2.png)
![advanced get oscillator.mq4 advanced get oscillator.mq4](https://www.forexmt4indicators.com/wp-content/uploads/2015/03/ForecastOscillator.gif)
Now when you are done you click on “Save” because the entry module just needs to be saved, the main module needs to be compiled by clicking on the little button here or pressing F7 and that worked without any errors and without any warnings so now I can click here or press F4 to go back to Metatrader. Here we would call the check entry (CheckEntry) function and that would return the value for the signal. In the last step we use the “return” function to return our signal to our main module in my case it’s the framework. In the other case now the “IADValue” would be smaller than zero we would create a buy signal and assign the word: “buy” to our signal. We could use the shift to move the Indicator to the right or to the left and for this simple example we assume that whenever the “IADValue” is greater than zero that will be a sell signal so we assign the word: “sell” to our signal. It has three parameters the first one is the symbol – that’s actually our chart –, the second one is the time frame, we use a 1 minute chart here but another time frame would be 5 minutes or 15 minutes and the last parameter is for the shift. So let’s define the IAD value (IADValue) that can be done with the MQL4 function: “iAD”, it is included in MQL4 and if you mark it and hit F1 you will see that it calculates the Accumulation Distribution Indicator and returns its value. One of the first things we need is to create a string variable for the signal that will also be called: “Signal” and we don’t assign a value because we are going to calculate that later.
ADVANCED GET OSCILLATOR.MQ4 DOWNLOAD
We need a string value and we will call the new function check entry (CheckEntry) because that is what I’m using in my main module to create a signal, this is the German version for the MQL4 Forex Trading Framework the English version still isn’t finished by now but you could also use your own module or download the Forex Trading Framework from my website later, but for now we want to continue with the check entry (CheckEntry) function. Usually we use the “OnTick” function because this function is called whenever a new tick is generated a tick is any price change here on the chart. To do that please click on the little button here or press F4 in your Metatrader, now you should see the Metaeditor window and here you want to click on “File/ New/ Expert Advisor (template)” from template, “Continue”, I will call this file: “CheckEntry_IAD” because that is what I am going to call in my main module, now let’s click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function here and lets also remove the two command lines. Now we want to find out how we can create an Expert Advisor that is able to create buy or sell signals based on the Indicator window here. If we speed up the process you can see that it’s actually making a profit.
![advanced get oscillator.mq4 advanced get oscillator.mq4](https://www.dittotrade.academy/wp-content/uploads/2019/05/7-acc.png)
In this little video we are going to trade this Indicator, it’s an Oscillator, it’s name the Accumulation Distribution Indicator and it will create buy or sell signals based on the value of the Indicator here.
ADVANCED GET OSCILLATOR.MQ4 CODE
Copy and paste this HTML code into your webpage to embed.