MQL4 and MetaTrader 4 - page 241

To post a new topic, please log in or register
Happy New Year to everyone! I want to turn off auto-trading from within my mql4 ea when a target equity is reached. I know there is a mql4 function to do this but I can not find it. I tried searching with no success. I would appreciate if someone can tell me where I find some documentation or...
I am new to MT4 so question might be silly. Is it possible to set a volume that is not listed in the list of volumes? For example setting a volume of 0.36? Same question about leverage.
Hi all, could you give me some reference or url to learn about chart a synthetic product, i mean, for example chart the substraction of two pairs or indexes. Is it posible two create synthetic products and backtest them with mt4?. Regards. 
G'day all I had this custom indicator made and for what I want it is a little beauty. It basically draws a box around inside bars, double inside bars, triple inside and so on. But I had it designed to work on smaller timeframes. A couple of things I don't like. But those are separate issues.  This...
Hello Fellow Members, I had a question concerning pivot points and datahistory. All pivot point indicators I find for MT4 only allow for the pivots tobe applied to the current day. I wanted to do some backtesting using pivotspoints but I’ve had to calculate them by hand and use the horizontal line...
Hi guys! How can i make indicator or expert advisor work only in MT4 strategy tester? Is there any peace of code?
Zero divides will cause an indicator to detach from a chart, but as seen here this is not the case. There is no error. Just a message that it was removed.
I wrote a small code to delete all order . At first it looks like this : void Close_Grid(){            for (int i = OrdersTotal()-1; i>=0;i--)               {                  if (OrderSelect(i,SELECT_BY_POS) == True)                     {                        if((OrderSymbol()==Symbol()) &&...
Hello - very simple task(i think) - is it possible to create ea that grasps the internal file text or excel or whatever and places the orders with predefined values?; I would appreciate the mql proggramer answer and help; thanks much!
Hi, Before I get a programmer to develop a program (EA), I'd like to test out a semi automated system. I'd like to place orders, close orders or modify orders from an excel spread sheet. and with a single click load the order instantly. I think this is pretty straight forward. Thanks George
noobshow
I have a NewBar() function which allow my expert trade only on New Bar, but i've been seeing different results using Every Tick and Open Prices Only,why?   My Expert trades On New Bar, but yet still seeing different results in the two Strategy Tester Modes..   Is there a way to achieve same results...
Hi, Does anyone here tried to open/close a CDialog with a click of a button on a base CDialog EA? Thanks...
I'm just curious as to whether theres any outlet for combining idea's and skills together. Like a website or such. I was going to email my old university to find out if there were provisions for getting a team together, such as 2/3 coders, 2 mathematicians, an electro mechanical engineer and a...
I wanted to log MT4 ticks for external analysis. I used test code in an EA like this (running on a 1M forex chart) void OnTick() {    MqlTick last_tick; //---    if(SymbolInfoTick(Symbol(),last_tick))      {     Print(last_tick.time,": Bid = ",last_tick.bid,             " Ask = ",last_tick.ask,"...
Hi there, i need a little help. When i open a position, i need to set the stop to move to breakeven when the price reaches 50% of the take profit distance. Only once, i don't need that the stop keeps following the price. Is this possible? Thank you!
I have multiple charts open at a time and many objects are attached to each chart , because of too many objects are updated on all the charts results into to much use of my CPU cycles  almost 25% of CPU , with the help of  IsChartVisible() , I want to limit object to update on chart which is visible...
I'm trying to write a script which writes my trading history to a binary file. I tried to follow the example at https://docs.mql4.com/files/filewritestruct, but I keep getting the compile error "'tradeBuff' - parameter conversion not allowed OSR Trade History Recorder Binary.mq4 72 33"  I can't...
Hi! Is it possible to use original quotes from Thompson Reuters in MT4 terminal (M1 timeframe)? May be there is a server like 192.168.32.32:433 so that I can connect to it? I am really satisfied with Metaquotes quotes, and I really love them, but I wish to compare the quality, for example with pure...
I'm not sure if this has been raised before as there have been several reports of MT4 crashing in the various recent build updates. I'm on build 940, using Windows XP SP3 I have run several tests in strategy tester on a new EA that I have written and everything works fine.  Then I tested it on...
Hi guys, im new in EA, im create EA but im having trouble with errors 138, and how do i put take profit by modify order from input  because when i create modify order take profit the result still error 138, here my EA #property copyright "Andy"#property link      "Andy" extern int     Magic =...
i have trade using robot i trade many curencies in one platfrom, but when the signal confirm in several curencies it only execute one ow two curencies, IE : its Conform to execute EUR,GBP,AUD,JPY but its only excute EUR and GBP, what logic or setting do i had to fix
Hello together, when I press F11 I get a FullScreen of my Chart and if I press F11 the Chart gets small again. Is it possible to see in mql4 whether I have Fullscreen or not. Regards Falte
Hi, i wonder , is it possible to update some value such like Arrow or Text on terminal screen when debugging Step Over or Step Into? it would be great if i can see updated value on the screen real time when debugging. any help or guide appreciate! thanks
I see that the horizontal scale does not sync with the candlesticks when zoomed fully in. It syncs with all other zoom settings. Is there a setting I should change to sync full zoom?
Hi, I need help to fix my code. My intention is to identify trend with alert or some object text based on Moving Averages for several bars (TrendMinDurationBars). Here is the idea: "Trend Up" when MA[shift n] <= MA[shift ...] <= MA[shift 2] <= MA[shift 1]"Trend Down" when MA[shift n] >= MA[shift .....
Hello everyone, i'm trying to modify ATR indicator from standard library with iMa function for learning purpose, the code is:   //+------------------------------------------------------------------+//|                                                          ATR.mq4 |//|                   Copyright...
Hi guys im here with the typical problem again im trying some code but the EA doesnt trade when the Rsi1<=70 code is in. double Rsi0 = iRSI(NULL,0,14,PRICE_CLOSE,0);double Rsi1 = iRSI(NULL,0,14,PRICE_CLOSE,1);if (Rsi0>70 && Rsi1<=70 &&  Bid<Close[1] && Close[1]<Open[1]) if the code i said before is...
DEAR SIR, Please give me simplest sample code for , file write , file  append ( one samples for text file  , and one sample for csv file ) thanks you sir
It's seems that on build 940 there is a bug using Global Variables: when you add manually a GV all is ok, and you can perform normally other functions (modify and delete). But if you close the platform and reopen it you loose all changes. Probably there is some problem with the copy of changes on...
Hi, I try to fix one EA, and make and indicator that shows OrdersTotal(), but when I do backtest and attach the indicator that shows total orders, the indicator shows NOT THE BACKTESTED EA's total orders, it shows the actual MT4 account orders. So, what the problem and solution?