MQL4 and MetaTrader 4 - page 1163

To post a new topic, please log in or register
I am about at my wits end with having to make exceptions for normalized double's that don't make sense. I have had most of my troubles with conditional if statements There are several occurrences of this problem throughout my expert. Most I have either found a different algorithm to handle the...
The value here comes out as 0.00 What am I doing wrong in the iMA ? Comment("Teeth value (red) is: ",DoubleToStr(iMA(NULL,0,TeethPeriod,0,MODE_SMMA,PRICE_MEDIAN,i),2)); This only happens on GBPJPY
I have two points: orderopenprice() and High(1). I need to simulate a Fib Retracement between these points by drawing a line from the open price thru High(1) to get price points. How can this be done?
Please help to set time points: I want to set a time point that's sometime before a given time, for example: TodayDatetime=2009.07.09 0:00, to calculate a time point that's two weeks earlier: TwoWeeksDatetime=TodayDatetime - 2*7*24, time unit in hour, the problem is how to make this work? Thanks,...
This EA in the tester only entered 1 trade in over 2 years worth of data. Any ideas why? It's based on the alligator indicator and when the green line moves below the red line or vice versa, it should enter a trade. All trade closes are handled by the stop loss, which is modified at regular...
  Alert sound (3)
Hi When I use the Alert function, it makes the alarm sound once. How can I get it to repeat the sound every 10 seconds and then stop when I press the Ok button like the normal alarm system already built into MT4??
I am modifying the alligator indicator. I want it to send me a screen alert when the green line crfosses the red line but it does this constantly, not just once and then again on the next cross Any ideas: [quote] for(int i=0; i<limit; i++) { //---- ma_shift set to 0 because...
How do you get user input for the external variables here? Also, what is the function to have the message box say OK, rather than YESNO? [quote] //+------------------------------------------------------------------+ //| Lot amount based on SL.mq4 | //|...
I have an expert that its performance is satisfying for me! I'll welcome any comment. startegy tester
Hi, I need the code for Probabilistic Neural Network algorithm for Keystroke Authentication which is based on Biometrics,my project is based on VB.net 2005.Please help me.I have no time,i should submit my project by 13th April 2009. Thank you
Wondering if there are any articles on MUST HAVES or DO's and DONT't for an EA trading strategy. I want to design an EA that opens 1 buy or sell trade at a time based on indicator signals and changes the SL based on another indicator as the PA is moving. If the EA is attached to one chart, will it...
Barrowboy can you please help me with the SL of this EA it does not work right and also does not send me Emails can you show me where i am going wrong johan
Is there anyway we can project the channels created by !LinRegrBuf forward by a number bars to a maximum of say same no of bars as last+ swing lowhigh or high low?
Where is the value of the AO in this code? I want to add an alert that tells me when the zero value has been hit or there has been a cross from +ve to -ve and vice versa: [quote] //+------------------------------------------------------------------+ //|...
when I run it in tester the following code nicely draws me vertical lines, each day at the New York open. . I want to make it into an indicator so when I'm looking at historical charts, I don't have to go blind trying to read the open time. int start()  {...
Hello Blessed TRADERS, PLEASE CAN SOME ONE HELP ME TO BUILD A SIMPLE EA THAT DOES THE FOLLOWING: WHEN A NEW CANDLE OPENS FOR THE DAY IMMEDIATELY PLACE TWO PENDING ORDERS BY ADDING 30 PIPS TO THE OPEN FOR BUY SUBTRACTING 30 PIPS FROM THE OPEN FOR SELL TAKE PROFIT 10 PIPS STOPLOSS 50 TRAILING STOP 5...
I want to use FXCM to trade (using a practice account only for now) and I want to setup an automated trading system using my own system. The basics of it are opening trades with different currency pairs and then closing at a set limit and at the same time as the first positions close then opening...
What is the variable for the chart name in MQL4 code? eg how do I print out a message that says my alert is for Chart EURGBP
Hi. I need support, and open this topic to who is interested, about this one: It exist still, or it does not exist and so how to make a: EA or Program (embedded in mq4, not exteral .exe) that  work on an expert advisor automatically? In other words a method for changing variables, external variables...
-
1) Can an EA open more than one order in the same time and at the same price? (without using a pending order). For example, I want to open 3 order at 3pm candle open. 2) Can an EA stop/close an order without using a pending order? For example, if we want to target $5.00, the order will stop if the...
I was using the strategy tester to optimize an ea. Suddenly it is skipping data and only using data for Mondays (if it uses anything at all).....I've reloaded the data, tried different dates to test,tried different ea's, reset my computer, tried different brokers platforms...still it skips data....
Is it possible to open up to 15 lots ? (= 3 trades x 5 lots) ?  Could someone from MetaQuotes Software confirm this ? Regards "The minimum trade size is 0.1 lot, the maximum one is 5 lots with the stepof 0. 1 lot for each order. The maximum amount of simultaneously opened positions and pending...
I am working on an EA where I want it to close out 1/2 the existing order on reaching a specified TP, and then moving the stop loss to +10pips of the entry price, then sending me an alarm. How can I right click over an order and enable this in the code or would I need to type in the Order number and...
Hello everybody, I have query for EA program related to Moving Average. WHEN MA20 ( MOVING AVERAGE WITH PEROID 20 AND PERIODICITY 5 MNTS) CROSS THE PIVOT LINE THIS WILL SELL AN ORDERS. I have idea of pivot line and sell order program.My problem is on the main section "CROSS".How will i find the...
Hello, To initiate this fascinating world of forex! I need a help! I want an EA with Stochastic that works like this: Buy whenStoch > 30 Sell when Stoch <80 (is an instance) I hope someone can help me! Now thank Paulo (I am Brazilian, not ever quit!)
  Using OBV (1)
Hello, is there any practical method to use the parameter(or function) "OBV"( On balance volume) in the code(in custom indicators etc.) instead of "close"? i.e. replacing the symbol "close" by a symbol(or formula)that represents "OBV" If anybody has an idea, thanks in advance.
can some help me where to place a tralling stop i have use extern double TakeProfit=250; extern double TrailingStop=15; i have placed it here but it is not working if(OrderType()==OP_SELL) { // if(Open[1]<Ema && Close[1]>Ema) if (SEMA1>LEMA1 && SEMA2<LEMA2) OrderClose(OrderTicket(),OrderLots(),Ask...
Is MT4 used by big instituitons like Hedge Funds?
Was thread Conditional Statement failure... [At wits end] if ( 1.4225 > 1.4225) is NOT TRUE!!!!!! At the suggestion of AIS, I have changed all my double comparisons to format    if ( double1 - double2 <relation> 0 ) // Fails if double1 == double2 My EA obtains parameters from a custom...
I am just starting in MLQ4 I want to know if someone can tell me how to test to see if the price bar has crossed the upper or lower Bollinger bands, and how to test to see if the close is above or below the bands. Thank You wmwhit