Hi Steve,SteveHopwood wrote: Nice one Pat. Thanks. I reckon it needs to be
if (TimeHour(TimeLocal() ) == MarketOpenHour && (ObjectGet(LowLineName, OBJPROP_PRICE1) != iLow(NULL, PERIOD_H1, 1) && ObjectGet(LowLineName, OBJPROP_PRICE1) != iHigh(NULL, PERIOD_H1, 1)) && !TradingDone && !DisableLineUse)
otherwise the condition will always fail because it is always != to one of the conditions.
I have made this change and am catching up with the tread before posting the update.
OK - I have a problem with AND and OR. I agree with what you said in the post.
But that's not what is in 1j
currently in 1j
Code: Select all
if (TimeHour(TimeLocal() ) == MarketOpenHour && (ObjectGet(LowLineName, OBJPROP_PRICE1) != iLow(NULL, PERIOD_H1, 1) && ObjectGet(LowLineName, OBJPROP_PRICE1) && !TradingDone && !DisableLineUse)
should be?
if (TimeHour(TimeLocal() ) == MarketOpenHour && (ObjectGet(LowLineName, OBJPROP_PRICE1) != iLow(NULL, PERIOD_H1, 1) && (ObjectGet(LowLineName, OBJPROP_PRICE1) != iHigh(NULL, PERIOD_H1, 1)) && !TradingDone && !DisableLineUse)
maybe?
pat