Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Indicators - 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 12-27-2007, 06:04 PM
Junior Member
 
Join Date: Dec 2007
Posts: 4
inssuc is on a distinguished road
How to paint "Close[i]/High[i]" in seperate window?

hi everyone, when i try to draw a line of "(Close[i]-Low[i])/(High[i]-Low[i])", i get a very strange result. to my opinion, the line will wave between 0 and 1, but actual result is a straint line, i'm puzzled, can some one explain this?

here is my simple code:
//-----------------------------------------
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 White


double buffer1[];
int CountedBars=0;

int init()
{
SetIndexBuffer(0,buffer1);
return(0);
}

int start()
{
CountedBars=IndicatorCounted();
if(Bars<1) return(0);
for(int i=Bars-CountedBars;i>=0;i--)
{
buffer1[i]=(Close[i]-Low[i])/(High[i]-Low[i]);
}
}

Last edited by inssuc; 12-27-2007 at 06:42 PM. Reason: get new problem
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
How to paint "Close[i]/High[i]" in seperate window? inssuc Metatrader Programming 3 12-27-2007 09:53 PM
Are there no "and" "or" operators in mql4?? kxracer500 Metatrader 4 2 06-23-2007 08:14 AM
MT4 is there a "close all open trades script/command?" keramikus Metatrader 4 3 05-29-2007 01:49 PM
Lot sum after EA test / Avoid "CLOSE AT STOP" budhax Expert Advisors - Metatrader 4 4 02-16-2007 03:16 AM
what's the meaning of "close at stop"? phoenix General Discussion 2 06-24-2006 02:07 AM


All times are GMT. The time now is 08:05 AM.



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