Expert Advisors and Automated Trading - page 321

[Deleted]
Hello guys,  What is the code to delete the last ticket pending order, but it is important to do this, just one time! For example: EA opened 02 orders: 1) Sell Limit 2) Buy Limit If one of thoses orders had a deal (Market hit the price) and become an "open trade", imediately EA will delete the...
i have 100 charts in meta trader. i wanna have a list of the charts in which 20-day moving average is below the closed price. how can i have this list?
  finding PipValue  (4)
Hi  How can I gain the pip value of any currency pair ? its not problem if its with 1 , 0.1 Or 0.01 Lot  is there any prepared code for it in MQL ? Or I should write code to calculate it ?
  mq5 ea macd  (2)
Hello all I need a working, solid mq5 MACD signal EA. Can someone please help me? Thank you so much :)
  local variables  (1)
can any mql master tel me plz difference between local variable and static  i m new in mql so masters come and guide me
hello friends i want a code for mql 5 that clear the expire or disabled symbols from my market watch? anyone can help me?
Hi, I am trying to get a value from an Indicator (that is not an array) and pass it to my EA.  I believe I need to pass the variable by reference, but am struggling on how this works (I am using MT5.) Specifically, I am using Harmonic Pattern Finder V2 and would like to capture the value of D at the...
Hello  I am software engineer and I code metatrader programs for 4 years. I know all syntax about metatrader5 my problem is not in syntax my problem is in anatomy.  I have some problems about metatrader 5 programming 1- why did you seperate orders as positions, orders or deals ? why did you need...
Hi all, If my EA decides that based on my money management , my lot size should be 0.003, what will happen as my minimum is 0.01 lots? Thanks
hi   i tried but failed . i know how to close without hedgeing broker order in m5. but i cannot able to close order with allowed hedgeing in mt5 broker. any one can help me in this
My english is a little rusty... so... I made an EA that open orders in Strategy Tester. I know... you gonna say... Reallyyy?! right... But... wait a minute... you will understand... LOL I use SELLSTOP and BUYSTOP orders with specific lote size and price to manage the behavior of my EA. It functions...
Greetings. MetaTrader5 comes with some Dialog examples. The EA example is in Examples\Controls and the Indicator example is in Examples\Panels\SimplePanel. The EA example creates a floating dialog that can be dragged around, and the Indicator example creates a docked dialog which docks under the...
I would like to be able to add CObject derived objects to CArrayObj, but overload the [] operator to return the pointer of the derived object instead of CObject* class MyArrayObj : public CArrayObj { public : CObject * operator []( const int index) const { return (CObject*)At(index);} }; Similar
i am trying few hours to count total open position of magic number 0  for mt5. and want to get open price of all orders? int GetOrdersTotalByMagic(long const magic_number)   {    ulong order_ticket;    int total=0; //--- go through all pending orders    for(int i=0;i<OrdersTotal();i++)...
Hello, guys! I'm implementing an Expert that operates based on a 3 EMA cross, using a time filter (it makes trades only during a period of the day). The main rule is basically:      FastEMA > MediumEMA > SlowEMA = buy   (FastEMA < Medium EMA = stop loss)     FastEMA < MediumEMA < SlowEMA = sell...
 I am looking for fast feed for DE30. I’ve used lmax, but maybe it is possible to find smth faster..
Hello, I'm trying to modify the StopLoss of all of my active trades using MQL5 after a new candles has been closed. I tried a lot of things and nothing seems to work - isn't there any simple solution for that? The problem is always that the selection of the postions never works out. PositionsTotal()...
Will MQL not support the casting of simple struct ? https://www.mql5.com/en/docs/basis/types/casting#casting_structure Struct casting is a basic feature in MQL, but now it does not work. Why MQL disable this featue?  // MetaEdit: v5.0,build 1596.   April 26,2017// MT5:      v5.0,build 1596.   April...
Pls help me to modify Lot of my EA. From 0.01 to 0.05, 0.1 and so on.  Regards. :)
Hello, I know that most people in Europe use a comma instead of a period for the decimal place, and I am curious about how MetaTrader 5 and the MQL5 editor and compiler handle this. 1. When Europeans type in a decimal value in the MetaTrader 5 user interface, do they use a comma or a period for the...
Hi, Guys, I tested some EA history, some result were good, but some result were blank, is there anybody knows the reason? please help me, thanks a lot.
  Non lag zig zag  (2)
Hi, Does anyone know if a free Non-lag zigzag EA is available out there? thanks! jeap
Pls can someone explain this senerio pls,I use this code to tell make the EA wait for some seconds but my problem is when its Attached to each symbol said like EURUSD, and gbpusd after number of wait is completed it loop in to another pair time and Made the pair to wait again ,there by creating...
Hi all - I am new to this and trying to host on a VPS a particular strategy. I was reading through the rules and notice a 32 chart limit? Is that true. Can i not have more than 32 charts open on the terminal and host that on vps
  Drawing lines  (2)
Hi,  Script to inform prevHigh and prevMin on D tf. However, trying to drawn lines to represent it. Not sure what is happening. Any idea ? trying to draw H_Line to represent prevHigh and prevMin.  Using two functions: High,   HLineCreate(0,highlevel,0,0,AntColor,AntStyle...
Hi to all the community, I'l like to set my EA to take one trade at time because is entering a position so many times at the time (my EA is based on take positions at the crossing of two MA, so each time the lines crosses it takes a trade, I'd like to take the trade just one time when the lines...
It appears that FileIsLineEnding does not reset the EOL flag when called. This makes it impossible to use it to iterate over lines of text in the following fashion: 1   while (!FileIsEnding(fh)) {2      while (!FileIsLineEnding(fh)) {3         words[i++] = FileReadString(fh);4      }5   } The first...
I coded a basic price calculation for an MT5 oscillator and it calculates correctly you can see after the second vertical line, the value is 0 to the end the problem i have is that it stops 10 candles early and i really dont know why it does this...
Hi all, I want to create some functions to return some signals and put them in different files to have more order in the void OnTick() function. So my problem is this. In another file I want to declare the function like: int fun_to_declare(double *array) {//some thing to to} And in the main ,...
Hello All ... I'm doing mql4 coding since the early days of the language ... Since few months I have been thinking to post this or not ... It is not personal to any coder here as I believe it is a fact that all must take care of it ... (correct me, if I'm wrong !) ... You may noticed that 10's of EA...