Forum

Quick Question on Variable Assignment / Counter

I want OKShort to stay = 1 until the condition for OKShort = 2 is met. Right now, OKShort stays = 1 only on the bar where Low == ll. As soon as we hit the next bar, and Low != ll, then OKshort goes back to 0. I want it to stay at 1 until I assign a new value. double hh; double ll; double OKShort;

Newbie with quick muliplication problem

Can anyone tell me why the line of code in G reen w orks, but when I try to multiply X by 0.25 ( Red Code) t hen my order does not get placed? double hh; double ll; double ll2; double X; //---- Set Variables hh=High[iHighest(NULL,0,MODE_HIGH,Entry,0)]; ll=Low[iLowest(NULL,0,MODE_LOW,Entry,0)]; X =

Need Coding Help

I'm trying to find the syntax to determine the highest high in the last 5 bars... or the max high in the last 5 bars. In tradestation it would be highest(high,5). Can anyone tell me what the syntax would be in MQL4