Indicator or expert?

 

Although I've programmed in various languages for the past 20 years, the time dimension of MQ4 is loosing me.

I would like to have something alert me after the following condition is met:

Current -2 Low < Current -1 Low && Current -2 High < Current -1 High

A sell would occur as soon as the current price drops below the previous bar's low, but only once.

The sell indicator gets me.

How do I find the instantaneous current price in an hourly chart?

Any guidance would be helpful as this is my first one....

Jerry

 

https://docs.mql4.com/predefined/variables

Look at this, some of your questions should be answered

Chart bars are numbered 0 for the current bar, 1, 2, 3 etc going backwards into the past.

Bar index 0 is always the current bar.

"How do I find the instantaneous current price in an hourly chart? "

price = Bid;

price = Close[0];

price = iClose(Symbol(), PERIOD_H1);

price = MarketInfo(Symbol(), MODE_BID);