MQL4 and MetaTrader 4 - page 763

To post a new topic, please log in or register
extern int UPPER_LIMIT_ON_COUNTLOWHIGH=5,TOTAL_ORDERS=3; extern double SL=200,VOLUME_LOT=0.01; extern int SLIPPAGE=3,TP=2; int countlowhigh=0; double prevprice=0.0; //+------------------------------------------------------------------+ //| expert initialization function...
Hello, Is somehow possible to have multiple Market Watch windows ? Let's imagine grid 4 x 4 or 4 x 3. Thanks for answer. Neufurth
Hi guys, I need help. I have created a simple custom indicator for using functions such as iRSI, iADX,...in some EAs. I noted if I use for the custom indicator the same or smaller ( for exemple 60 min, 30 min) timeframe than the one of the chart (for exemple 240 min) where I use it, there isn't...
Hi, I have a SIMPLE PROBLEM: There is opened BUY LIMIT order 30 pips lower than current Ask price. If the Ask price increases over 30 pips I would like to modify OpenPrice() of this order (set the OpenPrice() 30 pips lower from current Ask price AGAIN) and do it every 30 pips (not every pip but...
How to check the total number of open orders? Is there any function can do that? I still don't get the meaning of OrdersTotal(), does it include all current open orders and stop loss/take profit orders? or it only include open orders, if so my problem is solved. hope someone can answer this, sorry...
Ok guys, I need another set of eyes to help me with this one. //~~~~~~~~~~Basket-Stablize:if(Order_Manage(iMagic,"Abs_Last_Order_xSymbol_wMagic")==true){    if(StringSubstr(iSym_,0,3)=="USD" && iType== 1){        if(Base_=="USD" && Signal== 1){Signal=0;}        if(Base_!="USD" &&...
  Holy Grail (8)
hello I have been searching high and low to get a glimpse of it and i landed on a pic. It tells a 1000 stories. Only thing missing is its name. I attach its photo and i request anyone out there who might know its name to help me out. Please post its name. Thanks in advance
  Newb question (5)
If you open the prebuilt indicator Alligator.mq4 and add the one Print statement to the code as seen in the attached jpg. When this is compiled and added to a chart, I would expect to see in the Experts window the first Print executed would show, I = 0.....but it shows 208 for the chart I am adding...
Hello all, I have bought into the "Hector Trader" system, but I can;t seem to get the provided templates and indicators onto MT 4....I click on the "here" button (on Hector's website) but then I don;t have the choice to import into the MT 4 platform...any help please?
//+------------------------------------------------------------------+//|                                                GBPUSD trader.mq4 |//|                      Copyright © 2011, MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Earlier I forgot to put in the code that I want to have this work on. It is attached here now. This is like a Semi-Auto EA. Enters trades well, then keeps adding more lots and won't close the trades. Need to get this fixed. I am a newbie coder and this one has got me. Hope someone can help me with...
  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...