Download MetaTrader 5

MQL4 and MetaTrader 4 - page 794

To post a new topic, please log in or register
  code plz (3)
hi all . can you help me plz
I am using neurosolutions. But I don't have any idea for using Neurosolutions dlls in mql4. I approciate any helps or dll wrappers file from this forum members.
Hello, I programmed a simple EA and need the values out of the Custome Indicator. I dont know how to get those values from the Custome Indicator into the EA so I calculate them in EA programm too. I started MT4 twice and compared the print() in both windows and they seemed not to be the same. The...
Can someone please help me with a code that can enable an ea to execute one trade per currency pair per day without constraining chart period to PERIOD_D1 and using "if(Volume[0] > 1) return(0);".
Hi Coders! Is it possible to protect the EA to prevent changing the period of the chart? My first opinion is the following code in the deinit() function: int deinit(){int ret=MessageBox("Remove EA?", "Question", MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2);if(ret==IDYES){   Print("Deinit -...
Hi! So I am using what's below for buying or selling. It's a little messy because I am still experimenting, but I was wondering if anyone knew a way to program it so every time ma - ma2 is greater then 0 this condition occurs, then resets and doesn't check again until ma - ma2 is less then 0? If I...
Dear all Below shown is an extract of my code. There are two questions I can't solve: 1. when I compile the program, an error message occured: ' Y ' - variable not defined (i.e. the sentense under Close Order Block). However, what I want to do is, assign 0 value to Y after close of order. 2....
If I have an indicator that has 3 different values for entry. How can i code entry Buy/Sell for each value with a stop on a buy 1 pip below the previous candles low for a Buy, and 1 pip above the previous candle plus spread for a sell. The trade would close on the indication of a signal in the...
Looking at the error code reference table I see 4 different error codes that all have to do with an invalid price/quote. I'm wondering what the difference is between codes 129 (Invalid price), 135 (Price changed), 136 (Off quotes), 138 (Requote) as they seem to all imply there's something wrong with...
I will appreciate if someone could help with adding alert to this indicator. The indicator draws many colored lines, am focusing in alert when the price touch any of the (2upper red lines) or (the 2lower green lines). Please help, i need it badly.
Hi! How does one get this back so that it will display three trades rather than just one? Is there an adjustment that will let it show an arbitrary number of trades (say 5 or 6)? Not sure how I messed this up... Help is greatly appreciated! :) - John
How to store the bid and ask price of the last 60 seconds in an array and to use them? Thanks!
Hi I was wondering can someone quicly outline these: 1) PRICE_CLOSE 2) PRICE_OPEN 3) PRICE_TYPICAL Thanks
Dear all I've made the following code: //---- ObjectDelete("TERMNAME2"); ObjectCreate("TERMNAME2", OBJ_LABEL, 0, 0, 0); ObjectSet ("TERMNAME2", OBJPROP_BACK, back); ObjectSet ("TERMNAME2", OBJPROP_CORNER, corner); ObjectSet ("TERMNAME2", OBJPROP_XDISTANCE, xdis + 520);...
Q1: If my EA opens buy position 3times(ex, #1 1.2222, #2 1.2101, #3 1.1987), I want my EA to figure out the average price of all my opening position(must be 1.2103) Can I get the average figure of all my opening positions by MQL4? Q2: Can I emulate that trailing stop only works for the...
looking for a coder to make not suse if it would be a indicator or ea that will set buy, sell, ring alerts according to levels set for indicators .
Hi, is it possible to access the metatrader server from eg. activtrades, alpair, ... via JAVA ? I am looking for a direct connection for snding order signals via java e.g. MT4Connection mt4=new Mt4Connection("IP",Port,Username,Password); not the solution to send a message via java -> dll -> terminal...
Hello, I am a "newbie" to programming and am enjoying learning, even though it is MT4 stuff. I have made an EA to work off my indicator and trade plan and would like to get the trade comment to include the pair so I can sort easily and see which pairs work well and those that don't. This is the line...
hi guys, I'm trying to figure my way out of this programing tough.Maybe some differant eye with more experience could see what I did wrong on this script. I wanted to create a ea that would trade in both ways and I actually encounters a major problem. it's not doing what it is supposed to. here is...
Is there a way in MQL4 to copy and paste objects like 'trend lines', 'arrows', 'Text'? I've tried double-clicking on the object and then pressing Ctrl+c, but that doesn't seem to do anything because Ctrl+v doesn't paste anything. Right-clicking on the object, there's no choice to Copy or Paste.
i m newbie for mql4. i need help from seniors. i want to insert and remove the chart template files (tpl) in Expert advisor I dont know how? Please give code for this Thanks in advance regards Suman
for (i=total-1;i>=0;i--) { if IOrderSelect(i, SELECT_BY_POS, MODE_TRADES)==TRUE) { if(OrderMagicNumber()==MagicNo) { if(OrderType()==OP_BUY || OrderType()==OP_SELL) { SumPrice = OrderOpenPrice(); OpenCount++; }}} if(Opencount != 0) { AvgPrice = SumPrice / OpenCount } This is a part of...
Need someone with knowledge in programming indicators am willing to pay for service.
I tried to modify some EA. I want to add some Buy_Stop But it failed Could someone help me?? if(BuyQty < Walls) { cmd = OP_BUY; price = Ask; colour = Green; takeprofit = Ask +GridPip*Point; if(UseStopLoss == true) StopLoss = Ask - StopLoss*Point;...
Hello Every One... I like to use a custom Moving Average Indicator. x=0.00000 5 decimal places and adjustable IF (Current MA Price - Previous MA Price) > x = (Lime) line IF -x < (Current MA Price - Previous MA Price) < x = (White) line IF (Current MA Price - Previous MA Price) < -x...
Hi guys. Did you know some programmers can do EA or modifay it with low price. thanks
Hi everybody! I'm triyng to code an indicator based on MA's in a separate window but the problem appears with the last one i want to add...in the following pic you can see that the red MA (which is a "Drag & Drop" MA from the left panel) is in a different scale over the others.I found the behavior...
Hi there, I have a question. I am running MT4 and I have several profiles set up, one in which is for my ea's. In expert advisors tab located in options, in the tools drop down menu, I have un-ticked the box called disable experts when the profile is changed. However I notice when I change...
Hello, on my old account is my EA running. When I print my Report, I can see the Bilanz chart until this EA is running. Is there any possibility to start me EA on a new PC and to get the Bilanz chart from that time, my EA started running on my old PC? I saw, that I can fetch the old orders from...
Hi Folk, I need help on one question. I need to know what can i specify the "take profit in Value and not in Rate" Example: I'd like to fix in my order the "Take Profit" and " Stop Loss" in Euro. TP=30€ SL=75€ What can i do? (This function there is not in MEtatrader platform) Thank you very much for...