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 Fri May 17, 2024 10:23 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Current True Range?
PostPosted: Sun May 22, 2011 12:31 pm 
Offline

Joined: Sun Apr 03, 2011 12:35 pm
Posts: 11
Hey,

I wanted to make an indicator showing the CTR:

MathMax(High[i]-Low[i],High[i]-Close[i+1],Close[i+1]-Low[i])

Unfortunately, the indicator builder doesn't allow me to use this calculation. Any ideas?


Top
 Profile  
 
 Post subject: Re: Current True Range?
PostPosted: Sun May 22, 2011 9:23 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You cannot use i+1 to refer to a bar. It starts at i and move to i-1,i-2, etc
i is current, i+1 is not correct.
You can rewrite your equation to make it work.


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