MQL4 and MetaTrader 4 - page 1008

To post a new topic, please log in or register
I have a script that I want to create 3 objects on my chart. I can do this, BUT I want all the objects to also be SELECTED upon their creation. This way i can easily move them around with out having to right click>objects list and then selecting them that way. Can this be done? I don't see any code...
retrieve candle high, low, open, close, (shift 2) and then shift 1 and shift 0 as well, just retreive the prices i am intereste in. can anyone direct me to those functions? TY
Hello, I'm looking for a function which can list all available symbols. The idea is to scan some patterns over all currencies which I can trade with my broker. Does this function exist in MT? Thanks!
hello, I have programmed some indicators, but haven't used the great feature of metatrader regarding EA's including the strategy tester. To generate an EA for the strategy tester, I copied the code from my indicator to the EA, since the EA's generally don't seem to be very different from the...
if (trend==-1 && s==0) { if (b==1) {OrderClose(ob, OrderLots(), Bid, 3, Black);} os=OrderSend(Symbol(),OP_SELL,Lots,Ask,3,Ask+SL*Point,Ask-TP*Point,"coment",1,0,White); s=1; b=0; } if (trend==1 && b==0) { if (s==1) {OrderClose(os,...
Hello, I really don't know how to check if there is an open position on selected currency. For example: I have 2 opened positions on GBPUSD and USDJPY and I would like to check if there are any open positions on USDJPY. How to programme it? Regards!
I would like draw the lines as the (E)xpert (A)dvisor on Meta Trader 4 and refresh it every next bar. Let's use only 100 last bars. The green line should be drawn as the connector between two points: 1/. LOW of the last bar (always) 2/. LOWEST bar of the last 100 bars - but if the line cut the price...
Hi, I have been looking and looking and have not been able to find this EA. There has to be one already made....This system is not mine but it has been working very well for me: BUY: 1. 6 or more candles down then an up candle. 2. RSI below 30 3. %R below -80 TS of 20 pips to keep losses to a...
I'm trying to bring the value of a buffer into my EA with the iCustom function, but no matter what I do, change the calculations, assign another value to the buffer, I get the same result: 2147483647.00000000 Does this value represent an error in the buffer, such as an overflow?
  Bugs in MT4? (4)
Hi, I have encountered the following errors while writing my indicator: //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_buffers 2 //+------------------------------------------------------------------+ //| Custom...
I want to show a lot of MA in a indicator. So, if I can use two-dimensional array as buffer, It will briefly written form of circulation. Like this:    for(int i=0; i<96; i++)   {      Param[i]=10*(i+1);      SetIndexBuffer(i,ArrayMA[][i],INDICATOR_DATA);      PlotIndexSetString(i,PLOT_LABEL...
I am seeking some advice on an issue that is not very clear to me. In a 1 Min chart the last Close[] price - when does it take place, is it at the 1:45:59sec or 1:46:00? If the second case is correct, is the close[1]=open[0]? My question tries to solve a problem in which I am trying to detect the...
This doesn't make sense to me...so I'm here to ask for some help. In my Expert Advisor I am placing a pending BUY STOP above current Price, yet it is generating the 130 INVALID STOPS error. This is an ECN broker that doesn't allow stoploss or takeprofit on pending orders... so I have set those...
I am trying to find a way to add the following two indicators to my charts in MetaTrader with no luck so far. Both indicators are available with FX AccuCharts. Any help would be greatly appreciated. MACDForest Directional Movement System Any idea where I can find these two indicators and add them to...
Hihi guys My metatrader charts are based on Bid quote so the highest lowest open and close of previous bar is highest Bid, lowest Ask ...etc. When my broker wide the spread from 2 pips to 40 before Fed for example (EURUSD) and there is no significant move, lest assume that there where no move for...
How to lock equity periodicaly, example first equity 300, when reach 330 stop and continue next week. Start again with 330, when reach 363 stop ad continue next week again. i tried with : double Eq=AccountEquity(); if (AccountProfit()>= Eq+(0.1*Eq)){ for (int l=OrdersTotal();l>=0;l--){...
I wanted to compare broker prices so I used the back tester on 1 minute time scale and dumped the prices to a file for two different brokers. I accounted for the GMT differences and plotted the prices on a chart with minutes on the X axis expecting to see the prices following each other but they...
Is there a way to close all open orders when the balance reaches an amount?
Anybody know how to code an average total holding days of a trade from the account history?
Hello,,,,, Does the mobile version of the metaquote trading station works on Windows Mobile6 Professional ? Thank you,,,,,,,,
Is there any way to turn off or hide the indicator details and coefficients displayed on the screen so that proprietary indicators are private?
hi everyone, I need programmers to do a few EA, If you are keen i will give you more details. pls let me know your rate Regards Hans Ng
Hello, I am still learning MQl4. Would someone please explain what the purpose of the moving average shift used in the iMA indicator is? What does it mean to shift the moving average and what is its application? Thanks.
I have been trying to get the following code into a DLL for use by an Advisor. I am stumped...even after looking through all the error 127 postings on this forum. I am using VS2008 C++ to create the DLL. Below is my C++ Code. // Genetic Test.cpp : Defines the exported functions for the DLL...
  downloads (1)
hi unable to down load to desktop? keeps asking me where to download to if i say adobe, adobe will not allow. what am i doing wrong. d n
Hello to all, I have a working EA. Not saying it is a profitable EA. It is for experimenting or for a better understanding to this MQL4. Let's say a sell position is opened at .8555 AUDUSD. 12/15/2009 and that a 20 ATR was calculated day before at .0034. I want to set a stop for 2 times the ATR of...
I found this Ea and indictor on the forex-tsd website. It backtest great but won't trade LIVE. Can anyone help me??
hello, i need a custom indicator which will show me the values of all of my indicators. (for example stochastic: i dont want to just see the line i want t see the line AND below each point in the line (every bar) the value of that point in the line. (probably writtent topdown  so as to avoid values...
i need iStochastic to have fixed values. from 0 to 1. I can choose that in the chart but while i program that into an ea it has varying values it seems am i right? can I make it be 0 to 1? any info from the gurus will be much appreciated. thank you.