Download MetaTrader 5

MQL4 and MetaTrader 4 - page 739

To post a new topic, please log in or register
  Coding questions ... (38   1 2 3 4)
mladen This is an indicator so I'm not sure OrderType works in an indicator. I can't seem to get OrderType() to work. In the last line of code the BasketType always shows 1 for both op_BUY & OP_SELL. the OrderType always shows 0. Thanks for your help, I hope. Ray Line 231 if((OrderType())== OP_BUY)...
Hi all, I was playing around with an EA(kind of) to show me the total number of objects in a window. I used an Point and figure indicatos that uses boxes. Wnen I let the tester run at "normal speed" (slider at about 30), I get all the objects counted. However, if I hit "skip to" buttom, it stop...
IF you see in MT5 you could find this indicator. I have attached it here. There are similar ones in MT4. My problem is that I want to apply it to "Low" or "High" not only to close. You could do this in MT5, But because my broker is using MT4 I need to do it in this platform. Can Anybody help? I...
  weekly box (6)
I have a problem with the times on this chart. It works with the one hour chart highlighting a box for the daily range but on the Daily chart, I am trying to highlight a box for the last week and it doesn't highlight the correct number of days.    double AlertsOn = 1;   int periodmltp = 0;   int h =...
#property indicator_chart_window#property indicator_buffers 2#property indicator_color1 Red#property indicator_color2 LimeGreen//----extern bool Show_Alert = true;//---- buffersdouble upArrow[];double downArrow[];string...
I would like to make an program that can open orders when every new bar presents conditions are 1. new bar present 2. current price higher or lower than the previous bar's high or low 3. does not exceed order limit // how many times it can open order in one direction. e.x. for uptrend, int...
  DDE Servers (2)
I'm new to MetaTrader. I'm wondering about one thing - DDE Servers. As far as I know data feeds are expensive things and from the other side if I can export data from MetaTrader using those DDE Servers stuff. 1) Is this legal? 2) Am I able to obtain tick data with OHLC from MetaTrader using DDE...
Hi, I am struggling with my first EA and I am getting error=1 when calling function (take profit/modify SL/scale out) Attached is the code for taking profit/scale out the Alert shows funny digits for SL, and I cannot understand why it fails It appear to be some major issues I need to learn with my...
Hi, would someone be generous to help me and attach a simple traing hours function to this ea i have tried to add the function iTime but with no success
In MetaTrader5 I see only few, most popular symbols: e.g. EURUSD, GBPUSD and so on... I'm wondering if other symbols, less popular are also available in MetaTrader5?
I keep getting the '\end_of_program' - unbalanced left parenthesis error when I compile the following indicator code. Anyone could tell me why? int start()  {        if(OrderSelect(ticket_number, SELECT_BY_TICKET)      {       order_profit = OrderProfit();      }        free_margin =...
for(int pos = OrdersTotal() -1; pos >= 0; pos--)      {//:for       OrderSelect(pos,SELECT_BY_POS,MODE_TRADES);      if(OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)         {//:1         IsTrade++;               if(OrderType() == OP_BUY)             {//...
Hi guys, i have programmed the following StopLoss: double StopLossDyn() { double MovAver = iMA(NULL,0,10,0,0,PRICE_CLOSE,0); double BB= iBands(NULL,0,10,1,0,PRICE_CLOSE,MODE_LOWER,0); double y; double x; y = ((MovAver-BB)*100000); x = MathAbs(y); return(x);} My frist question: did i make a logic...
After spending considerable time at trying to have this EA control the number of lots, I could use some help here. Because I am still new to the MQL4 program code, I can't quite put this together. I feel that bool has to be used here to bypass the Lots Optimizer. All I want is the EA to enter 1...
I have two live accounts with IBFX. In each I have two or three different EAs running on different. Today I saw that the EA that ran on AUDUSD in account 1 was not on the chart and the EA that ran on AUDUSD in account 2 was not on the chart either. The two EAs are different and they are in...
  iCustom? (2)
I am trying to find values of an iCustom indicator at different bars back. Is there anyway to get the values by a bar number without making a seperate iCustom lines with each bar number? For example if I had the below and wanted to find the values of the 10th, 5th, and current bars, would I have...
I have been working with the MT4 platform and I have had some charting issues that I have not yet found a way around. What I basically I want to do is to create objects( trend lines, channels, fibs, horizontal lines, recs and triangles etc) on my chart on a particular symbol and to configure the...
I want to buy a new cellphone but it must be able to take metatrader 4. Can you please help me. Thank you Brenda
I'm not sure how to debug this, or what to do about it. I am also not 100% certain what a 136 error is. I think it means my EA requested quote but non was given. I would have thought the real lVPS setup would have been the one that worked and not the demo account running from my PC. Here is the...
Hello every body, I have an idea requires me to be able to place about 30 orders in mega fast if i can before price changes within 1 or 2 pips, and in same time to get the ability of cancel and amending all orders which haven't been executed yet, how can I do that ?? i have MT4 and MT5, Please...
I’m not very fluent in programming. Does anybody know how towrite the module allowing for the new order not earlier than 10 bars after thelast order close? I tried to find it butall I found it was one trade per bar and it is not I want. I appreciate anyhelp. Thanks a lot!
Hi,i downloaded metatrader 4 mobile setup from smartphone edition (1.10 mb) on my phone, samsung sgh-i200 which runs windows mobile 6.1 version and read that the application wasn't intended for the device. I learnt that the software runs on windows mobile. what do i do.
Hello, I really need some advice from you,guys... I'm trying to "persuade" an Ea to open different lot size positions on a straddle type range...but, as I'm totally crap at coding(trying to learn the basics), I wasn't able to do much... What I want is to open let's say 0.01-0.01-0.03-0.03-0.06-0.06...
anyone know about this company in details? is it new or stay quite a while already in the market? tried on internet searching but couldnt find any info ... anyone knows please share...thank you
Hello all, I have been working on this for days, but have been unable to correct my code to get correct mini lot for Gold, without getting zero divide error (where objects don't even show on chart). TO CORRECT TICKVALUE FXDD GIVES YOU: Gold: PairPipValuePerLot = (MarketInfo("XAUUSD",...
  help dll (10)
hello pls help me i have a dll, i want to create dll,how i can call fuctions of frist dll from my dll I am a delphi developer pls help me by example thank you
I want to set a stoploss on EURJPY to a set USD value. For example I want to put a stoploss lets say worth a $0.75 USD on the EURJPYm pair. How do I calculate that please.
We are working on an EA and we want to optimize the parameters in real time using an external application such as Matlabs or Excel. What is the best output for data, in the experience of expert coders here? Simplest, we create a flat file that is updated every 1 second, which is read by the...
Hi, I am trying to learn how to do some basic backtesting with MT4 and EA's. So I downloaded historical data since 2001 for USDCAD in txt (cvs) format. Then converted it to .hst format. Loaded the chart into MT4. The data is in M1 time frame. Then tried to do some backtesting using the following...
Hi, I have just tested my ea on both fxpro (on minilot of 0.1) and go trader (on microlot of 0.01), both with TP of 5 pips. On fxpro the ea ran just fine; however on go trader the ea won't open any trades as long as a TP e.g 5 pips was set. But when the tp is "0" it opened trades. Is this due to go...