Download MetaTrader 5

MQL4 and MetaTrader 4 - page 657

To post a new topic, please log in or register
hi when i wrote: for(i=0;i<10;i++) { macd[i]=iCustom(Symbol(),0,"MACD",5,13,1,0,i) } if(macd[0]>macd[1]) Print("yes"); the result is 'if' - too complex expression what should i do of that? please help, thanks.
hello anyone.. i need help, please put sound alert on this fibo indicator so that we alert when the price in area fibo 38.2 and 23.6. i dont know how to put this indicator here so i copy code only:- #property copyright "Copyright © 2009, Julien Loutre"#property link      "http://www.forexcomm...
forexparvenu
  can i use these () {} so much ?? (67   1 2 3 4 5 6 7)
//+------------------------------------------------------------------+//|                                                        xxxxx.mq4 |//|                                              Copyright 2012...
Hello, I was told that when optimization of a forex robot is in effect you can only have one file in the tester/history. But it would appear that another one has been created, do i need to remove that new one? I was told only one file can be in this location at one time, other wise it confuses the...
Hi, ever since i started trading forex i always had such a problem. My EA was set to trigger position every 80 pips. If 1st buy position was 1.20000, it should trigger second buy at 1.19200. However it does not open new position. When i realize it should open a position but never. i would normally...
Cannot modify Inputs. Line gets a blue highlight, but the value does not allow a change. I have been changing values for years. Until now. What circumstance would prevent changing an Input value? Help, help! And thanks. Bob
  StackSize (6)
Hi All, When setting the compilation options there is a setting for stack size. I'm quite familiar with the concept of stack size (I'm from a technology background) but am surprised to find no posts about this on the forum and documentation gives nothing meaningful. Any ideas as to when we may need...
Hi. The break-even scrip (that I want to insert into my EA) works for the buy orders, but doesn't work for the sell orders. Can anyone tell me why? Did I miss something? // Breakeven / stoploss void TrP() { double pb,pa,pp; pp=MarketInfo(OrderSymbol(),MODE_POINT); if(OrderType()==OP_BUY)...
Hello all please help me how to set text (trendline description) to my trendline?? this is my code: ObjectCreate("myObject", OBJ_TREND, 0, StartDate, price, EndDate, price); ObjectSet("myObject", OBJPROP_WIDTH, 1); ObjectSet("myObject", OBJPROP_COLOR, Red); ObjectSet("myObject",...
Hello! i am having problems getting my EA to add a stoploss that is very close to the entry price, for example when trading live I cannot get my EA to add a stoploss if it is under the broker minimum is there a limitation on the platform that stops an EA from re-adding a stop loss if at first it...
Greetings, (Lots of questions lately... ) Anyway, I like the system that MT4 paints the price tab in red or green 10 pips before it takes an action (SL, TP or buy/sell if pending) It works fine with currencies like EURUSD, but in some commodities like FT_GOLD, it paints these tabs "too late". I...
When the EA quited, It stores its value till next run (session) of the EA, or reseted by initial value at the beginning of next session ? Thanks for help.
Hi, Normally to replace squiggly lines on indicators to histogram bars I simply replace the text in the code DRAW_LINE with DRAW_HISTOGRAM. In the attached code, DRAW_LINE is missing so I was hoping that someone could explain how I can amend it to display bars instead. I've been searching for...
Greetings, I would like to calculate the value of one 1 lot (in US dollars) of each pair or commodity that I trade on, and to place that value at the corner of my screen. Is there such script already ? James
New article A Few Tips for First-Time Customers is published at mql5.com: A proverbial wisdom often attributed to various famous people says: "He who makes no mistakes never makes anything." Unless you consider idleness itself a mistake, this statement is hard to argue with. But you can always...
properkhunt
Does anybody know of a script that allows applying trailing stops to all open positions of the same currency/commodity rather than one at a time? Is there another DragDrop like with T/P and S/L?
Hi all, I am just a newbie in coding EA. I heard much about kinds of EA programs. My problem is: How to choose the best for my favorite ? I don't believe there is an EA that works well with any pair, or/and with any timeframe. I think an EA must be intended for a certain pair on a certain timeframe,...
hi, how can I get EA code to descript the various shape of bars or MACD? such as double bottom, head and shoulder? some examples for reference? Thanks.
Nowadays, expert advisors have become more & more sophisticated with more variables. The expert property window in normal and optimization mode cannot be resize and the height is quite short for an expert advisor with common variables. I used to mod the window but not able to do it now since the...
is they any way to change mt4 password by EA or dll, i want to implement auto log out mechanism to overcome revenge mentality
New article How to Post a Product in the Market is published at mql5.com: Publish your interesting applications in the Market, and they will be immediately available to all traders who use MetaTrader 5 worldwide. The Market is a great opportunity to earn, with an immediate transfer to the account...
I'm using oanda and when ever i pick lot size i can't go above 0.05, it says i don't have enough money. I have set my balance at $1,000 50:1 When I buy the price moves very little (in cents) it takes a while to get a dollar. it also says margin used is $120 and margin free is $880 (because of...
Preliminary Announcement of the New MetaTrader 4 Build 421 Over the next few days, we will release the MetaTrader 4 update. In addition, from June 1, 2012 support for client terminals older than build 416 will be discontinued. In this regard, we strongly recommend all traders to update their...
I wonder if there is a function to read a var that its name is constructed with StringConcatenate() Note: AFAIK, arrays not allowed as external variables So, let say we have 16 external variables called 'trade1' to 'trade16'. Each such var holds an integer number that is a valid OrderTicket() from...
Hi, Lets say we have two instruments that follow the same trend. E.G. Dax and DJ, or WTI and brent. if there is a certain gap between them, you open long position of the upper and a short position of the lower insturment. Position close when they meet. Is it possible to program an EA that can do it...
Hello all, I am optimizing an EA and have a quick question. Can i load the platform twice or three times and run multiple tests? or will the two sharing back data get confused? It takes so damn long to run a test and wanted to kill two birds with one stone. Thanks
In my EA order is not placed by EA. The code is given below Any solution? if(manualshort){if(Close[0]< sellline){ if ((CurTime()- Time[0])>= 360){  if(cnt<2){res=  OrderSend(Symbol(),OP_SELL,Lots,Bid,1*PipFactor,0,0,"Volume: "+Volume[0]+"Time: "+TimeCurrent(),SellOrder,0,Red); cnt++;...
APeng
Hello everyone! I have several charts opened where is have drawn specific levels as horizontal lines. If those lines are broken, I want to get a signal. I found that code #property show_inputs#import "user32.dll"   int GetParent(int hWnd);   int SendMessageA(int hWnd, int Msg, int wParam, int...
New to MT4. Trying to set up my system. I want to add two moving average lines, one at 10 and one at 5. I have set the 10 to Red and the 5 to Yellow, but both display as grey lines, making it almost impossible to distinguish between them on the chart. All my other lines display in the correct...
Hi all, when an order is opened my expert writes a comment in the order. Can I avoid that the expert modifies the comment when half position is closed at target price? Thank you!