MQL4 and MetaTrader 4 - page 1066

To post a new topic, please log in or register
Hello every one Appreciate your assistance as I am not a programmer I have been looking at the EMA_CROSS_2 EA but seem it does not work properly, It suppose to sell if the Short EMA cross below the Long EMAand Buy when the Short EMA cross above the Long EMA, it is doing the reverse, it isbuying...
Hello, Can someone tell me (if possible) how to use multiple symbols in System Tester? My E.A. sends orders for different symbols, but I can´t test it in S. T. . For example, if I´m using symbols "EURUSD" e "GBPUSD", if I choose "EURUSD" as main symbol, the OrderSend returns errors for "GBPUSD"...
Dear All, I am a newbie of MT4 and I am practice with this language. I would like to develop a EA that open a SELL position when value go over Up BB band (and viceversa). EA will close this position when we will have 2 pips of profits. I have written thsi code but at the moment only with SL and TP...
Does anyone know why, OrderOpenPrice( ), returns 4th decimal number instead of 5th? Thanks!
  looking EA (1)
Looking a EA that once opened an order administered the order and depending on the evolution may open other orders...to close the series...like martingale...Somebody knows something it's?
  OrdersTotal() (4)
Hi all, Trying to call this function to check no. of open buy orders... When the code is called as a function from start() it always returns 0. When the code is placed in start() at the same place as the call it always returns correctly...??? Any ideas? TIA LL...
If there is no info on ticks in history, where are the ticks in tester coming from? I am not blind. I am serious. The history file contains only Open, High, Low, Close and Volume info. When we test the EAs, we see ticks. And we see the price TICKING up and down even on M1 time frame. When I asked...
I am new to programming the algorithmic language for MQL4. I am trying to program a script that will read prices from a txt or CSV file and insert horizontal lines in a chart for each value. Sometimes there could be 60 to 70 lines per chart. It would be nice to also be able to set the color property...
I love it when a position moves significantly into the green. So say a position has $200 profit showing. To lock in those profits, I'll rush in and set up a new stop loss at say $100 profit. It never fails to always bounce back, hit the stop loss, and then move another 50 points in the direction...
When i add an indicator using iStdDevOnArray to my chart, MT4 memory jumps by 10megabytes Open "empty" MT4, 24 megabytes in use. Add indicator below, un-comment iMAOnArray function, compile. Memory usage barely changed, still 24 megabytes. Comment out iMAOnArray and un-comment iStdDevOnArray....
if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice()); { sellstop=OrderSend(Symbol(),OP_SELLSTOP,Lots,NormalizeDouble(OrderOpenPrice()-50*point,digits),3,0,0,"try2 sample",magic,0...
I have no programming experience and I have put about a 100 hours into learning and coding my EA. It does what I want it to do, but it will set a stop order and may fill it 4 hours later. How can I get the ea to execute buy or sell stop on the next bar only or wait until the criteria happens again....
To have my ea place a stop order entry at the high of the previous candle, do i need to set the high price as a new variable or will the ordersend function accept chart based price data such as high low etc?
I know it sounds like a stupid question but my thinking is that if the mobile MT4 does the same job and works on a desktop then it must use less resources and that opens up other possibilities like running many copies on different brokers or using older computers with less ram. Does anybody have any...
double close240 = iClose(NULL, PERIOD_H4,2);double High240 = iHigh(NULL, PERIOD_H4,1);double PreviousHigh240 = iHigh(NULL, PERIOD_H4,2);double Low240 = iLow(NULL, PERIOD_H4,1);double PreviousLow240 = iHigh(NULL, PERIOD_H4,2);double LowerBand240 = iBands(NULL,PERIOD_H4,20,2,0,PRICE_LOW,MODE_LOWER...
Hello i have COT data but in .PRN form, how how can make MT4 read such format( in separate window ) Regards
Hi, i need someone to write me a file that will simply place a solid red line onthe london open (3am ET) and the US open (9am ET) for the entire historyof the data.
Hello, how would i output in my script how many seconds has past since 1970? I expect the number to be in a format ########## (probably quite a long number...) Thx! I tried looking up the date time format, but im kind aconfused (and new a coding) could someone possibly write exactly what i...
Gidday I am looking for a mm system that is based on using the daily range as the TP and SL. They way I am looking for it to work is the greater the range the more of the FreeMargin is risked and vice versa. I have attempted to code it my self but have had a bit of trouble My maths might be wrong...
Hi, I'd like to altern buys and sells op for my ea, but it keep on buys or sell.. I check the history tab with a loop with this code : int AlternBuySell(int MagicNumber) { int altern=0; int histb; int histbs=OrdersHistoryTotal(); for(histb=0;histb<histbs;histb++) { OrderSelect(histb,SELECT_BY_POS...
Hello All, I want to calculate the cost in account currency for 1 lot, so that I can now how much money I will lost/profit for 1 pip move. With this info then I can calculate in advance how much I will lost if stopped with stoploss, or how much I will profit if takeprofit is reached. Any hint?...
Hi. I have data for various pairs, but I can only get as far back as 1999. Can anyone assist in how to get data from 1989, because I need a longer term to better test an EA I am working on. Thank you. Lance.
Hi, I have a EA that I downloaded from a forum which backtests pretty well, it is a scalper with a small TP and much larger SL, when a buy position is opened and the market goes down it will open a sell position, the max opened positions is two, one buy and one sell, now I was trying to figure out...
Well, easy said. ive been developing EA for over two months now.. I had many EA, all based on different indicators, different variations etc.. But then I decided to create my own very simple EA working on very simply algorithm.. Not gonna describe the results, check the pictures and tell me what you...
With AUDJPY/M1 I stated that in charts for the period are missing 19 September 2008 until 26 January 2009 the bars. How can one close this gap? Or from where can one load the missing data?
I am just a beginner at building EA's, and scripts. I am still learning and still got a ways to go. Anyways in the mean time I want make in alert script to make my manual longterm trading much easier. I am in research mode to make an alert script that will notify me when a price hits a strong...
  Error #130? (20   1 2)
Hello, I have an error message #130 and I don't understand what is it... I trade on the EUR/USD forex. if (OrderType()==OP_BUY && OrderSymbol()==Symbol()&& OrdersTotal()==1) { OrderClose(OrderTicket(),OrderLots(),Bid,0,Green); } ticket=OrderSend(Symbol(),OP_SELL,lots,Bid,3,1.40,1.30,"Ordre Court",0...
Hi Everybody I have made a custom indicator that displays in a separate window that shows as a straight line. The reason is that I am using one buffer to feed back integer values about the state of the indicator and this buffer, although set to DRAW_NONE, interferes with the maximum level of...
Hello... Please advice me regarding the buffer calculation in the indicator. I modified iExposure.mq4 to show profit factor. but no data shown on the indicatorif added below code....
Hi, The subject listing pretty well sums it up. I’m new to ForEx and am using this commercial EA (FapTurbo v47 b225) on the MT4 platform while I am learning. With the default settings I was losing money. I’ve managed to tweak it so that it is slowly but surely gaining a little now but obviously...