What are the differences bewteen these 3 varibles please?

 

Hi

I was wondering can someone quicly outline these:

1) PRICE_CLOSE

2) PRICE_OPEN

3) PRICE_TYPICAL

Thanks

 

Constant Value Description
PRICE_CLOSE 0 Close price.
PRICE_OPEN 1 Open price.
PRICE_HIGH 2 High price.
PRICE_LOW 3 Low price.
PRICE_MEDIAN 4 Median price, (high+low)/2.
PRICE_TYPICAL 5 Typical price, (high+low+close)/3.
PRICE_WEIGHTED 6 Weighted close price, (high+low+close+close)/4.

 

Hi

Execellent, thank you for the pointer.

I have a MACD alerter that alerts me when the indicator has gone into buy or sell mode.

To prevent the alert popping up all the time it has this added:

bool newbar()

  {
//----
    static datetime NewTime = 0;
    if(NewTime != Time[0])
      {
        NewTime = Time[0];
        return(true);
      }
//----
    return(false);
  }

The only problem I am getting is that it only alerts me after the bar has closed which is sometimes too late, how can I get this to work on the current open bar?

Thanks

Antony

 

don't using newbar on alert condition.. because that means alert only called when a new bar is formed.. so why it only give alerts at the beginning of a new bar.

 
 

Ah right, thats a start then lol, could anyone show me what to use instead, as I am a newbie with programming.

Thanks

Antony

 

It comes as a surprise to some people when they realise that the experienced programmers here all started off as ... newbies.

The difference between then and now is ... experience.

And one of the best ways to get experience is .. to read about it and try it.

I have just a few months of MT4 experience (nearly 4 decades of other programming) and participate here - asking & answering questions, getting it wrong sometimes, but always ... gaining experience

That article has enough info (example code & what to search for) to more than get you started.

Unless you don't want to learn & get ... experience.

Reason: