Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1087

To post a new topic, please log in or register
Hi, newbie to MT I would like to see my MACD and Stocch settings in my primary charts running along with the price, I am only able to get them in the boxes below the chart at the moment. Cheers
Gents, I am having difficulties extracting information using the OrderSelect function. I would like to find out the opening price / lots / sl / tp etc using the functions within MQL and I've been working with the OrderSelect function but just not having any luck... Could you all give some feedback...
Can someone please help me as to how to have an alert emailed to you when one moving average crosses over another one in either direction? I do not want it to automatically place the trade for me, just the alert. I have found where you can have a price alert emailed to you, but that doesn't suit...
Hi I have an EA and I don't want that the EA trades the Close Open Gap. (FridayClose to MondayOpen) What additional function do I have to add to the EA? Thank you very much for your help Bye Thomas
Slawa, FileIsLineEnding() in Build 220 sends program into a loop. StringArrayLoad() from StringArraySuite.mqh revision 1 reference https://www.mql5.com/en/code worked in Build 218 but not in 220 when calling FileIsLineEnding. StringArrayLoad() from StringArraySuite.mqh reference https://www.mql5...
Hello someone Am a newbie with experts here. can you help me with an expert that can use Heiken_ashi_ma 20? Prefered properties are: Go long 10secs after consolidation of first blue candle, Go short 10secs after consolidation of first red candle, Adjustable stoploss and take profit levels...
I downloaded a free open source EA that was made by some russian guy. It has these parameters which I can't figure out what they would be in english... extern double Otkat = 40; extern double KoridorOC = 30; extern double KoridorOt = 8; // check for long position (BUY) possibility...
Hi i have a problem opening pending orders: extern int OperationType = 0; // 0 Mean Buy and Sell Limit // 1 Mean Buy and Sell Stop if(OperationType==0) { buy = OP_BUYLIMIT; sell= OP_SELLLIMIT; } else if...
  FileOpen() (1)
While testing and attempting to open an unexisting file, experts log yields correct message "invalid handle -1 in FileSize" but GetLastError() returns 4051 using Build 220.
Does anyone still keep the old MT4 version which has the recalculate option? If so, could you post the installer file here? This version is very useful to test tick data.
Hello, What is the code to create an arrow object? How do you tell it which direction to point? I want to be able to have an arrow point up or down depending on some internal indicators of my own. It doesn't matter where on the screen it is, but I would like to be able to control the position in...
I have a custom indicator that gives trade signals on the chart, arrows and stop signs. Is it possible for the EA to look on the chart to find the symbols and open and close trades from the symbols. I do not want the EA to use the custom indicator or call on it. I have tried many variations and...
Buy Entry 4 Hour, 1 Hour, 15 Min SAR indicates a buy 15 Min price is under SMA Buy Exit Initial Stop Loss -30 Pips Stop loss trials to: After the open of the next candle (15 min) the stop should move to (top (sell)/bottom (buy)) of the previous candles wick Sell Entry 4 Hour, 1 Hour,...
  modify order error 4051 (13   1 2)
HI I'm getting a error 4051 with this code when I use it with a OrderModify function, but only on the take profit part. the stoplose modifies correctly. Any ideas as to why? double LStopLose = iOpen(NULL, 0,0) - (iATR(NULL, 0, 5, 1) * 2); double SStopLose = iOpen(NULL, 0,0) + (iATR(NULL, 0, 5, 1)...
what does the exclamation point in this line of code mean/do? if ( !OrderSelect( z, SELECT_BY_POS ) )
Does the time frame of the chart having anything to do with the automated trailingstop changing the Stop loss order on a trade ? ATL (auto trailing stop) from menu in MT4 software, select the trade (RH Mouseclick), trailng stop, then pip selection. I am NOT refering to a EA trailing stop. Say I...
Hi everybody, I wrote the following code to get the indexes from the LSMA indicator on the current bar: index0=iCustom(NULL,0,"LSMA in Color",34,1500,0,0); index1=iCustom(NULL,0,"LSMA in Color",34,1500,1,0); index2=iCustom(NULL,0,"LSMA in Color",34,1500,2,0); but it always give me the same value for...
1/. When you start Meta Trader and press F3 there is window opened with GLOBAL VARIABLES. What for are global variables and how to use them? 2/. When you start Meta Trader on current time frame for example 15 min and current chart for example EURUSD you need refresh data every bar. How to refresh...
Hi, I am running the same EA on all wiindows to see its behaviour. And to have the actual situation of all in every window I want to write a global Variable into each main Window by Comment. So I wrote this littel function to set its value to the current state: 1. get the global-value 2. withdraw...
HELLO, HELP MODIFY THIS EA,IT HAS NO TRAILING STOP AND EA ACTIVE TIME FOR ALPARI.CO.UK BROKER TIME I NEED MODIFICATIONS AS ABOVE PLEASE THANKS GOD BLESS YOU
Hi all, I've read thru the MQL4 documentation and it all seem'd to be quite straightforward for developing own EA's or indicators. Anyway, I couldn't find any documentation on how to develope an EA or an indicator that would use data and from multiple time frames, for example 5M, 30M and 4H....
HELLO,HELP MODIFY THIS EA,IT HAS NO TRAILING STOP AND EA ACTIVE TIME FOR ALPARI.CO.UK BROKER TIMEI NEED MODIFICATIONS AS ABOVE PLEASETHANKS GOD BLESS YOU
Good day. I'm rather new with MT4, but have been an programmer 4 a while. I just want to know how to I put and up/down arrow where the "IF" are true. Eg... if x=y.. then put and up/down arrow at that point. I can put arrow in the "past" before the expert start running, but I would like to put one...
I have funded my account but in SigTrader the balance shows $0.00. I right-clicked my account number, clicked Login and nothing more happened. I can't work out how to move the funds into Sig Trader so that the balance shows there. Help would be appreciated. Thanks, Stuarp77
I wanted to keep error logs in a file, but the programme overwrote the previous logs and there was always one line. In the documentation, the example says that using SEEK_END can move to the next line and keep writing, but it didn't work for me. Also, sometimes when I opened the file and it showed...
Can someone please tell me why this gets and error 4109 - "trade not allowed" on the demo account I set up? //+------------------------------------------------------------------+ //| Test.mq4 | //| Copyright © 2008,...
What does the Slippage do in the order send function? Thanks
I have been strugling all afternoon on a little piece of code that has no reason not to work. It is a simple fucntion to modify existing orders. Here is the code: void test(){double last_tp_s=0, last_tp_l=0;int total=OrdersTotal();   for (int cnt=0; cnt<total; cnt++)    {      if( OrderSelect(cnt...
Hello! My first post here :) I just finished writing my indicator. However, I need to erase the old line which my indicator has drawn (e.g. from bar 50 to the last bar). Here is what i tried: for (int i=LastBufferValue; i<=Bars; i++) {   My_Buffer[i] = 0;} The above code does not erase the line from...
Please state me the mql4 code for this statement. if ( Highest(Bar, ROCSeries(#Close, 1), 3) < StdDev(Bar, ROCSeries(#Close, 1), 31)) ? then buy.
1...108010811082108310841085108610871088108910901091109210931094...1250