Download MetaTrader 5

MQL4 and MetaTrader 4 - page 292

To post a new topic, please log in or register
Hi, Is this possible to open multi orders for different pairs using single EA? eg: I would like to sell all USD pairs so when EA runs it must open Sell/SellStop/SellLimit USDJPY,USDCHF,USDCAD,etc... if possible please give me suggetions to start coding myself? I never coded for multi pair orders in...
I heard MT4 was portable, so I recently downloaded MT4 onto my external so that I can work on code while I'm not on my home desktop. I can access the terminal and charts fine, but I can't access meta editor. Pressing f4/clicking on it in the terminal doesn't bring anything up, and if I try to open...
Hi, I would like to count every tick for each 10 last bars (with the current bar) in PERIOD_M1. How to do it using MQL syntax ? I would like to get the following results: bar 0 (ticks counted: for example 25) bar 1 (ticks counted: 58) bar 2 (ticks counted: 28) bar 3 (ticks counted: 37) bar 4 (ticks...
Hello I can't seem to find an explanation via the help icon so I thought I would ask here. Please could somebody tell me what the variable inputs mean as shown in this picture:       Are the values in percentage terms? What exactly is MaxEARisk? is it risk per trade or risk per all opened trades? Is...
I havethese 2 Ea´s, one for H1 other for H4, both of them will place a market order (if trading conditions are met) at the end of the H1 and H4 candle respectively. The changeI would like to have done is : I would like the EA´s to wait X seconds beforeplacing the orders ( there should be an user...
Getting an error "OrderStopLoss' I-value required. I cannot find this error in any definitions.  Can someone point me in the right direction.  
Hi PLEASE can anyone teach how to use this Indicator ?
Hello,   I am in China and use MT4 for andriod to trade usually, yesterday i unloaded the software and reinstall it today then met a problem - i cannot select any servers! Could you help check this problem? my version of andriod is 4.3. thanks.  
I have written an EA which takes trade positions (buy/sell) on bar openings. Suppose the EA is attached to a chart of H1 time-frame, the the EA will make trading decision on the opening of a new bar (i.e. every hour), and if the decision is a go, it does the trade (either buy or sell). You can have...
Hi everybody, I don't know if someone else has the same problem I have. The day before yesterday I've updated my PC from Windows XP Home edition to Windows 8.1, and I've formatted my hard disk. Then, I've reinstalled my MT4 platform (the broker is FORMULA FX), and I've put my EAs into "Formula FX...
Hi, Is this possible to add list/combo box as extern variable? if yes how to add? pls. see image i attached here.
Hi All, I am new to coding (never done this before) but want to realize my own trading strategy. The system should send a buy order each bar (at open price) for a number of periods that is equal to an moving average used. After this the EA should close the first (oldest) order in the next period ans...
Hello friends,   I am developing a strategy, where i want to use an auto lot configuration, but not based on Stop loss or take profit, i want that the code uses a lot size that is a % of the total balance, for example:    If i have10.000 USD balance in the account and i setup the percentage of...
Hi, I'm facing a strange issue. I have a "Flag" order, a Pending order (OP_BUYLIMIT / OP_SELLLIMIT) with a specific comment. This order, could be triggered when market moves very quick, and my CloseOrders function closes this "triggered flag order", by checking with its OrderType, OP_BUY / OP_SELL....
Hi, This simple routine gives me an output of the latest tick every 5 seconds.  But I've found that if I don't use RefreshRates() before Bid, the routine just repeats the first value received.  Is this the right way to ensure that I get a new value every time Bid is accessed? for (n = 1; n <= 10;...
No answers, very expert peple indeed!!!
Here is a snipet from my trailstop function, here i select the orders to be trailed if(!OrderSelect(i, SELECT_BY_POS,MODE_TRADES)){                     Comment(">> Order select failed, error # ", GetLastError() );                     Print(">> Order select failed, error # ", GetLastError()...
Does the Bid variable work correctly in strategy tester, if so then what value it returns. And does it return the same value as Close[0] in Strategy Tester, or not?
error 131. This is the ordersend: OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Ask-500*Point,Ask+500*Point,NULL,0,0, clrNONE); Somebody know what is the error?
Hello, in the working source code below, on lines 74 we see:      ObjectCreate("H4_SMA", OBJ_LABEL, 0, Time[1], H4_SMA);   ObjectSetText("H4_SMA","H4 SMA",14,"Tahoma",Gold);   I would like to modify these lines such that the label is right-justified and all the way to the right on the chart at...
I hav erecently go some invalid stops occurring (Error 130) so thought I'd try the Market info stoplevel command as shown below. I just seem to be getting a value of zero 0.00000000 to be precise. The following code is the 'entire' EA I expect to return a integer number of points. void...
For some reason, the labels "H4 SMA" and "H1 SMA" are not being rendered on the y-axis where the H1 SMA has been calculated.   Instead, they are always rendered at the exact same place on every chart that I put this EA on. How can I get the labels to render at the computed value of the SMA? Source...
Hello everybody, I'm trying desperatedly to get the value of past stochastic values over n amount of bars. The error i get is "'[' array required". Could you please explain me why iStochastic function wouldn't start on a simple for loop? Here is my code. int init(){int i;  int...
I need some help to formulate a code which will close the order exactly at the bar's end.It is for a special scalper EA, so it needs pinpoint precision.Let me illustrate what i mean: Here you can see for example an M15 EUR/USD chart.Now imagine if i had any indicator that took me into a long trade...
Good afternoon, I hope you are fine. I would like to ask wether closing all trades with the following function is FIFO compliant, just to check. Is it enough to iterate trades backwards? For some reason it does not close all trades at the same time. for(int i = 0; i <= OrdersTotal(); i++) Thanks in...
Please let me know how i can post an article into this web site
Hello, I was looking at the backtesting results (1H, every tick) for an EA that performed exceptionally well and saw trades with impossible exit points. I only enter trades on candle closes and let them run until tp/sl. It seemed as though the EA both placed the trade **and took profit** at exactly...
What is the general structure of an EA?   What is wrong in that code? How it is done correctly? when I do the testing, using  "Print (" error ", GetLastError ());" it say "error 4054". But when I give opening that message, the txt says "Error 131". I'm doing this: void OnTick()   {    double TEND1,...
I am using PF12 to scroll forward one bar on my chart and would like to be able to capture that event in an indicator or expert in order to control a second chart to keep them in sync. However, I find that there is no keypress event generated for the pressing of PF12. Is there any way to capture...
Hi all, It's my first post here. I'm starting to learn about EA recebtly, and I've a doubt about time functions. I've been looking for a code that allow to buy/sell at a specific time, but I only found examples that work with a time value of HH:MM. What about seconds? Is it possible to define a...
1...285286287288289290291292293294295296297298299...1244