Undeclared identifier

 
// Exit orders, long trades
            if (MarketPosition == 1) {
                if (iBarShift(NULL, 0, OpenEntryTime) - 1 == 0) {
                    LStop = OpenEntryPrice - MMFrL * MathAbs(iMA(NULL, 0, NMML1, 0, MODE_EMA, PRICE_LOW, 1) - iCustom(NULL, 0, "ZLTrend", PRICE_CLOSE, NMML2, 0, 1));
                    LStop = NormalizeDouble(LStop, Digits);
                    LTrailOn = false;

                }


The message I get for undeclared identifier is for OpenEntryPrice.  I have no idea why.  Anyone know?

 

Before you start using a variable you must declare it as follows.

double OpenEntryPrice;

 
Nagisa Unada:

Before you start using a variable you must declare it as follows.

double OpenEntryPrice;

expression has no effect

 
Thomas Butler:

expression has no effect

Then there must be something else at stake. But no one knows for sure due to lack of information.

Reason: