Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2007, 02: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, 44 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-04-2007, 10:46 AM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 2,820
Blog Entries: 34
Linuxser has disabled reputation
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.
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum

Last edited by Linuxser; 03-04-2007 at 10:49 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-04-2007, 03: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!
Reply With Quote
  #4 (permalink)  
Old 03-04-2007, 06:53 PM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 557
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!
Reply With Quote
Reply

Bookmarks

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 270 10-02-2008 11:54 AM
Average Daily Range fxid10t Indicators - Metatrader 4 4 07-28-2008 07:51 PM
Average Daily Range KJB General Discussion 4 02-14-2007 08:42 PM
Average Daily Range indicator??? PipRippy Setup Questions 0 12-19-2006 05:17 AM
Script to calculate Average Daily Range? ycomp Metatrader 4 10 02-28-2006 03:18 PM


All times are GMT. The time now is 07:47 AM.



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