
06-30-2006, 12:46 PM
|
 |
Senior Member
|
|
Join Date: Jun 2006
Location: USA
Posts: 801
|
|
Quote:
|
Originally Posted by pipeline
I see you re trying hard, well done! At this stage I feel that what you need most is to know how to help yourself, so I would advise to use MQL's "NAvigator->Search" function _extensively_, you'll find answers to many of your questions (the only thing one can call from an indicator are the buffers, and this is done through iCustom(); Objects are not arrays etc. and much much more). For example, a search for "array" will teach that Current Bar's array index is 0, Last Bar's arrray index is 1 and so on.
If the search function entries are all overwhelming, you're probably trying to do stuff too difficult for you at this stage. I believe most of the examples above are touched on in codersguru's beginner's course, so I would recommend a second reading.
You might also take a simple EA, and try to simplify/modify it slightly, that will teach you how it works. Once it's done, you can try to complexify it.
Sorry if i m off the mark.
Now, in general, to work on Close price, you test for the Opening of a new bar and then write your conditions on arrays' index 1. A possible code to detect the Opening of a new bar:
bool NewBar()
{
static datetime dt = 0;
if (Time[0] != dt)
{
dt = Time[0];
return(true);
}
return(false);
}
Hope this helps, good luck.
|
ok about that search function...it doesn't return anything. I have tried to use it several times in the metaeditor. I type in what I want and hit return and nothing happens, or I click that little go box next to the search string and nothing happens. I was just noticing what a lame searh it is because it doesn't work at all. I am referring to the search feature in the metaeditor navigator window...is there some protocol to make it work that I don't know about?
|