Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2007, 03:06 PM
Junior Member
 
Join Date: Apr 2006
Posts: 2
Pepinillo is on a distinguished road
Average daily range indicator, help !!

Hello everyone,

Im trying to code my first MT4 indicator. It's a simple indicator to show on the upper left corner of the chart the average daily range (high - low, in pips) for a currency during the last 100 periods. But no matter how hard I try, it just doesnt do anything at all and I cannot spot out where the problem is.

Can anyone please have a quick look and tell me where the bug is? I attach the indicator down below.

By the way, is there any chance I could also set another parameter to analyze the average range during the last 100 days but only from 7 AM to noon? that's the time frame I usually trade so that piece of info would be useful for me too.

Thank you very much in advance
Attached Files
File Type: mq4 Average Range.mq4 (951 Bytes, 102 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-04-2007, 11:46 AM
Linuxser's Avatar
User Root
 
Join Date: May 2006
Location: Helliconia (Winter)
Posts: 4,410
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by Pepinillo
Hello everyone,

Im trying to code my first MT4 indicator. It's a simple indicator to show on the upper left corner of the chart the average daily range (high - low, in pips) for a currency during the last 100 periods. But no matter how hard I try, it just doesnt do anything at all and I cannot spot out where the problem is.

Can anyone please have a quick look and tell me where the bug is? I attach the indicator down below.

By the way, is there any chance I could also set another parameter to analyze the average range during the last 100 days but only from 7 AM to noon? that's the time frame I usually trade so that piece of info would be useful for me too.

Thank you very much in advance

You´re not correctly calling the double n?

PHP Code:
double av=0;
int i=0;


  for(
i=1;i<=100;i++)
       
av   =    av +  (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
   
   
double n=av/PeriodsBack;
   
   
Comment("Average Daily Range is ",n); 
Comment line should be like this?

PHP Code:
 Comment("Average Daily Range is ",+ n
Take a search for Ogeima´s daily range calculator.

Last edited by Linuxser; 03-04-2007 at 11:49 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-04-2007, 04:05 PM
Junior Member
 
Join Date: Apr 2006
Posts: 2
Pepinillo is on a distinguished road
Thanks for the feedback LinuxUser, but I have followed your advices and still it wouldnt work

Any idea what am I doing wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 03-04-2007, 07:53 PM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 676
cja is on a distinguished road
Quote:
Originally Posted by Pepinillo
Hello everyone,

Im trying to code my first MT4 indicator. It's a simple indicator to show on the upper left corner of the chart the average daily range (high - low, in pips) for a currency during the last 100 periods. But no matter how hard I try, it just doesnt do anything at all and I cannot spot out where the problem is.

Can anyone please have a quick look and tell me where the bug is? I attach the indicator down below.

By the way, is there any chance I could also set another parameter to analyze the average range during the last 100 days but only from 7 AM to noon? that's the time frame I usually trade so that piece of info would be useful for me too.

Thank you very much in advance

Everything you need should be in this indicator

LNX_Pivots_v2.mq4
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
average daily range calculator, average range, average daily range, DAILY RANGE, daily range calculator, daily range indicator


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FXiGoR DYNAMIC Breakout system on Daily Average Range iGoR Suggestions for Trading Systems 276 11-14-2009 06:31 AM
Script to calculate Average Daily Range? ycomp Metatrader 4 80 10-21-2009 08:48 AM
Average Daily Range KJB General Discussion 12 07-03-2009 10:30 PM
Average Daily Range fxid10t Indicators - Metatrader 4 4 07-28-2008 08:51 PM


All times are GMT. The time now is 10:32 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.