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 Sun May 19, 2024 9:07 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: confusing formula
PostPosted: Sun Apr 08, 2012 2:30 pm 
Offline

Joined: Thu Feb 16, 2012 1:47 pm
Posts: 16
Hello Admin,

I'm trying to create a custom Accelerator/decelerator indicator where i can adjust the moving average. The formula I found online as a guide is as follows:

1. Count the difference of two Simple Moving Average, AO.
AO = SMA(Median Price, 5) - SMA(Median Price, 34)
2. The result is the difference between AO and the Moving Average of AO
AC = AO - SMA(AO, 5)
Substitute AO with DIF would be more self-explanatory. The only reason to use AO is that the AO (Can't find indicator/ao-awesome-oscillator to include!) also introduced by Bill Williams.

DIF = SMA(Median Price, 5) - SMA(Median Price, 34)
AC = DIF - SMA(DIF, 5)

http://kolier.li/indicator/accelerator-oscillator


***The part that is confusing me is the equation AC = DIF - SMA(DIF, 5). How can I create a command asking for the SMA of AO??


Top
 Profile  
 
 Post subject: Re: confusing formula
PostPosted: Mon Apr 09, 2012 8:36 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
You need to create on indicator for SMA(DIF, 5) then a second indicator that uses it with the complete calculation DIF - indicator.


Top
 Profile  
 
 Post subject: Re: confusing formula
PostPosted: Mon Apr 09, 2012 10:29 am 
Offline

Joined: Thu Feb 16, 2012 1:47 pm
Posts: 16
thanks. i'm getting this message now that i'm ready to import the custom indicator. the image is attached. I also noticed the same message for all other indicators i've built before. what am i doing wrong?


Attachments:
Capture indicator.PNG
Capture indicator.PNG [ 73.49 KiB | Viewed 4772 times ]
Top
 Profile  
 
 Post subject: Re: confusing formula
PostPosted: Mon Apr 09, 2012 10:36 am 
Offline

Joined: Thu Feb 16, 2012 1:47 pm
Posts: 16
plus the custom indicator works just fine on mt4. i attached it


Attachments:
customAO.moi [1.58 KiB]
Downloaded 449 times
Top
 Profile  
 
 Post subject: Re: confusing formula
PostPosted: Mon Apr 09, 2012 10:48 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The message is fine. It just tells you that there are no variables in the indicator. Probably you need to use mode 0 to get the signal


Top
 Profile  
 
 Post subject: Re: confusing formula
PostPosted: Mon Apr 09, 2012 11:27 am 
Offline

Joined: Thu Feb 16, 2012 1:47 pm
Posts: 16
the equation is working properly. thanks


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