BuyExecute();
Is the last bar and will usually normally always be open Mohammad.
It does not have a fixed close price like all the other older bars.
As soon as it closes a new zero bar is opened and there will be a bar shift and new candle formation starts.
Is the last bar and will usually normally always be open Mohammad.
It does not have a fixed close price like all the other older bars.
As soon as it closes a new zero bar is opened and there will be a bar shift and new candle formation starts.
Please show the section of code where you set the value of PreDefPriceBuy
User could enter the price manually like 1.1234
In inputs of the expert
User could enter the price manually like 1.1234
Hello
..
in fact, I have noticed that no trades could be happen with the following code example:
BuyExecute();
while replacing the < with the <= would allow trading normally
BuyExecute();
..
Please show the section of code where you set the value of PreDefPriceBuy
In inputs of the expert
User could enter the price manually like 1.1234
Does the BuyExecute() get executed and fails? You do have checks in place ?
Mohammad Soubra: note that the < condition is the needed one (not the <=)
| Understand the links in The == operand. - MQL4 forum Ask >= OOP+n could be true because of round off and Ask >= OOP+n - 0.000005 and could be false at Ask >= OOP+n + 0.000005. If the equality is important use (must be true at Ask == OOP+n) Use "definitely >=": Ask - (OOP+n) > -_Point/2. // Note the minus If the equality is important use (must be false at Ask == OOP+n) Use "definitely >" Ask - (OOP+n) > _Point/2. If the equality is not important (false when equal or true when not) just use Ask > OOP+n |
Without seeing more of the code to understand what is going on, all I can suggest is to print the values of Close[0] and PreDefPriceBuy to see if something odd is happening.
!!!!
By editing from the user then the 0 should be a manually typed price
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
..
in fact, I have noticed that no trades could be happen with the following code example:
BuyExecute();
while replacing the < with the <= would allow trading normally
BuyExecute();
..