Forum

Cutting double decimal places without rounding

Hi, looking for elegant way how to get next level form price, e.g. _Bid is 10888.97 and I want to elliminate 0.97 from number and get 10888.00 When I use NormalizeDouble (10888.97,0), it gets me rounded result 10889.00 and that is correct. Converting double to string to integral and back to string

[MT4] Cannot find order when looking for OrderOpenPrice()?

Hi, having long time problem understanding why I cannot find order in loop when looking for OrderOpenPrice. I have temporarly solved the problem by adding open price to comment but this is not solid solution. Please suggest how to solve this. (In below code OrderComment() is commented out) void

Looping for highest order misses sometimes order information

Hi, having problem with loop, when part of main order is closed, loop misses to find existing order information and by believing there is no order code shoots to open new order. Code should find highest Buy order and remove part of the profit. Overall is there a better/safer way to code loops. I am

EA action without tick

Hello, I have a question, is there a way to code EA to make more than 1 cycle (e.g OrderSend) after getting a tick form market. Sometimes time between tick's is long and I want to open 3 buy orders . Today with my coding skills I need to wait for 3 market ticks to occure to get 3 buy orders open. Is