Forum

To Metaquotes: Bug in MT4

This bug is from more than 2 years! I use Windows 7 64 bit. When try to copy code from mql4 code with CTRL- C in metaeditor it is crashing at 80% of time. Please fix it. Problem signature: Problem Event Name APPCRASH Application Name: metaeditor.exe Application Version: 4.0.0.432 Application

Problem with updating a value

I try to do a random choice between two values​​, as shown below. The problem is that sometimes the value is not updated timely and the new value instead of using new uses old and new open order is wrong. Interestingly, then is updated, but it is too late. Where could be a problem? I trade on

Choose between two randomly selecting choices

How to get the EA to choose between two randomly selecting choices with certain probability. Example: I want EA "to decide" whether or not to open a new order with the following probability: 70% opens a new order against 30% likely not to open a new order? Of course "decision" is not static, but

Help with order close (for smoknfx)

Hi, I have the following problem: I use template from here: https://www.mql5.com/en/articles/1514 Function PrepareTicketsToClose makes an array of orders to close, but I have an additional variable NET_LOTS, which tracks the number of orders in the terminal. What I want, but do not know how to do

Check Open Orders

Hi, I want to check open orders (market) orders for special number in OrderComment. If order with same comment exsist do not open another order. Problem is that somethimes it duplicate order. Can you check for errors, please? int countbuy = 0 ; for ( int i= OrdersTotal ()- 1 ; i >= 0 ; i--)

Help with OrderComment()

Hello, I need EA to check opened market orders (BUY and SELL) and IF NEW bar - Open[0] is NOT equal to some of other opened orders BarOpenPrice - which is printed to OrderComment of each order to open new order. Of course if there is no open order at terminal this is not the case

How to code Global Variables?

Hello, I want to get values from offline chart : (Open[1] - Close[1]) and (Open[2] - Close[2]) from Expert Advisor attached to 1 Minute chart. I think the best will be to make one expert attached to offline chart that set values, and then EA attached to 1 minute chart get these values. How to code

How to get Open[1] and Open[2] from offline chart...

Hello, I need to get values for Open[1], Open[2], Close[1] and Close[2] from Offline chart, BUT my Expert Advisor is attached to 1 Minute chart. How to get it

Print info with OrderComment() function?

Hello, how to print more than one variable to order comment with OrderComment() function? Example: //+------------------------------------------------------------------+ //| It calculates the data for opening a new order | //+------------------------------------------------------------------+ void

Global Variables deleted when Expert Advisor trade on Offline chart!?

Hello, I use Expert Advisor which trades on Offline chart with no problem at all. However my Expert Advisor uses Global Variables and if terminal is closed all Global Variables are deleted! I have tried my EA on Standard chart and GV are NOT deleted if terminal is closed and re-opened. How to solve