this code can't even pass compilation https://www.mql4.com/files/MQl4BookEnglish.chm
double firstStartSignal = iClose("EURUSD", PERIOD_M30, BarShift); double secondStartSignal = iOpen("EURUSD", PERIOD_M30, BarShift); double firstEndSignal = iClose("EURUSD", PERIOD_M30, BarShift); double secondEndSignal = iOpen("EURUSD", PERIOD_M30, BarShift); if(Close[BarShift] > Open[BarShift]) double UseLow = iLow(NULL, 0, BarShift);
Initialize variables with constants outside of start. non-constants must be inside.
what is the value of UseLow when the if() is false.
Initialize variables with constants outside of start. non-constants must be inside.
what is the value of UseLow when the if() is false.
If Close[BarShift] < Open [BarShift]) then the UseLow variable then my wish is to not implement the BarShift variable. Should I add this as an "else" statement?
BarShift is supposed to be designed to shift to a bar other than the current bar to analysis. Thoughts?
It looks like you are missing a few closing brackets.
For this one:
{
OrderSelect(SellTicket, SELECT_BY_TICKET);
and this one:
{
OrderSelect(BuyTicket, SELECT_BY_TICKET);
It looks like you are missing a few closing brackets.
For this one:
and this one:

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Alright, I've put together a strategy that is supposed to buy at the open of the next bar when the previous bar's Close > Open. The trade ends either at my stop/limit or when the Close < Open (if I haven't hit my stop/target, my trade should end at the open of the down close). I cannot get this code to compile correctly, any advice?