MQL4 and MetaTrader 4 - page 42

To post a new topic, please log in or register
Hi All, hope you can help me. I have found that if my terminal is shut down by way of power crash or accidental click on the terminal x button, the EA that I was running at the time continues to run when I reopen the terminal, probably due to the incorrect removal proceedure. This nearly always...
mar5
Hi all, every morning I start the terminal I get many wrong signals because it takes a couple of seconds until all of my 20 chart windows are refreshed. So my indicators work during the refresh-process what they shouldn't do. I know that indicators can't wait but is there a possibility to check if...
  Need help with coding (133   1 2 3 4 5 ... 13 14)
Hi i am trying to code a very simple EA but i'm not a programmer and i've never made an EA before. I took the MACD Sample from MT4 and edited some parts and deleted all the rest that i thought i don't need. I'm sure my code is really horrible I would like the EA to work like this: My custom...
Hi guys,  I'm trying to make the OrderSend function work for my first EA, but for some reason it's not executed,  can anyone tell me what I need to change? Update: I can see that it works on forex, but I need it to work in stock indexes through spreadbetting.  For some reason it works in GBPUSD, but...
I've been attempting to average the High/Low range for a predefined number of previous price bars but cannot even get the array to compile without the error "struct member undefined" Can someone inform me of what I am doing wrong here? double candle_body[];ArrayResize(candle_body,num_quiet_bars);for...
Hi i would like to calculate lots such that if say account balance is $1000 to open trades with $100 in other words 10% and when the balance grows to $2000 to open trades with $200. This is some sort of incremental system that should maintain lot size of new trades at 10% of balance. How do i go...
  Trading on tick charts with MT4 ! (143   1 2 3 4 5 ... 14 15)
Hello short term (scalp)traders, I finally found out how to trade with MetaTrader(4) based on tick charts. This gives a much smoother price evolution over time in comparison with bar charts like M1 or M5. Indicators acts much better (faster) this way, at least in my opinion... I am a fan of Woodies...
I am having a problem I haven't seen before. Can someone advise me? Thank you.
Hello, I would like to have something (I don't know if it should be called na EA or a script) that automatically opens a position if the timeframe candle (that the ea is running on) closes beyound a certain level that we define. Note that it is not when price reaches that level, it would be when...
Dear Friends, Please try attached EA which opens buy and sell order at the time and order will be closed once Take profit is hit. Please Find Report as per below. Please give your feedback for the same. ymbol[/TD]EURUSD (Euro vs US Dollar)[/TD][/TR] Period[/TD]1 Minute (M1) 2012.01.27 00:00 - 2012...
Hi, I have a question. Receiving buffer signal from the indicator, I want to make BUY/SELL order when trend color changes. Attached indicator shows buffer signal such as Buffer1 =BUY BUffer2 =SELL I can order if buffer1 or buffer2 is not EMPTY_VALUE. However,if I do this, so many BUY/SELL orders are...
hi, i am not really good in programming but i have developed one ea using free online ea generator. the ea work well as per my expectation by opening an order when condition meet and close when hit tp i  set. however this ea only open one order when condition meet and will not open another order...
hello As you know, the OnTick event is generated when a new tick for a symbol is received, to the chart of which the Expert Advisor is attached. I have an ExpertAdvisor that monitor multiple symbols and I would like to trigger the OnTick event when a Tick from ANY Symbol in my MarketWatch is...
Hi guys, Is there a way in MT4 to send several orders at the same tick time without waiting for each order to be executed.. I mean market orders, not pendind conditional orders.. THANKS
Hi guys, So yeah, the question is in the title. I have an indicator which uses IndicatorCounted() to find out how many candles have not yet been calculated since "last time", but when i switch back and forth between two timeframes, IndicatorCounted() is always zero and thus the whole thing gets...
Hi, I need an indicator that gives a sound alert after the closing of the third consecutive green or consecutive red candle. Example: first green close; second green close; third green close... BEEEP ! Even better if it could calculate the distance in pips between the first open and the last close...
Hi all... please tell me what's wrong in this code? //+------------------------------------------------------------------+ //| GetVolumeInformation.mq4 | //+------------------------------------------------------------------+ #property copyright "Copyright ©...
Is it possible to have access to a txt file while an EA is writing on it ( for example opening it with Notepad )? Actually i'm using the FILE_WRITE flag in FileOpen function. Tried with "FILE_WHARE_WRITE" but returns 5008 error constantly
Hi there, I have the original code of COG for Mt4, wich is available everywere, but it is a linear poyection and I'm trying to make it look like the original Hurst channel. wich is not linear, is it possible?. Thank you!.
I'm attempting to solve an issue but I'd like to have an opinion which solution is more efficient/appropriate in the MQL4 way of thinking. I wrote an indicator that, once a minute, reads a website and extracts a certain value. It will then write that value and the time into a .csv file. Another...
I built this EA and I thought I put in the code to only make one trade per bar but it dont seem to be working. Sometimes it places more than one trade per bar. Could someone please help me figure out why? I'm checking with datetime and storing it in time.
Hi All I am trying to get the consecutive number of losses from within my EA. The number does count up but when i get a win ,either on buy or sell the counter does not reset. Is there something wrong with my code? void BuyCountLosses(){   int LossBuy =0;       for( cnt = OrdersHistoryTotal() - 1;...
"I know very little about coding. Is there any kind person out there that could possibly show me how to add an alert to this indicator?" Help to add an email alert and mt4 app alert to this rsi indicator
Hello everyone, I'm looking for a check function, So the EA checks if a trade of the symbol is already open and if its open already then dont open a second one. I use the Orderstotal() at the moment but then i cant open more trades from different symbols.    if(RSIValue<23 && OrdersTotal()<1){   int...
I understand little bit why define the MAFIC_NUMBER as an integer, not a string? I think define it as a string is much better than as an integer since you can transform an integer to a string but nit vise verse, right? Besides a string can tell much more than an integer. Right?
Hi, finally I managed to use NotePad++ (google) to edit and compile mt4-files with some surprises :) 1) I created one folder for both mt4-compiler: 32 and 64 bit. (you'll find the HowTo in: Editor=>F1=>Search:"Compiling") 2) In that folder I created as well two folders MQL4 and MQL5! 3) In the MQL4...
Hi there, I have multiple accounts running different EAs. I login into one account  under MT4, and drag the EA onto the charts and its running. That's fine. Then I want to switch to another account to test another EA but the charts with the EA from the first account are still there. How can I...
Could someone please help point out why this EA I have been working on will not place trades live. It seems to place them in the strategy tester fine.
Hi, I am trying to convert a my custom indicator, perfectly working, into an EA. I have set the iCustom function as follows: double vwp_up=iCustom(_Symbol,0,"VWP - Price",1,0);double vwp_down=iCustom(_Symbol,0,"VWP - Price",0,0); Commenting the those variables, to see their value, I get only...
Hi all, It's been a long time, suddenly I find everything automatically turned into MQL5? The following code is a three MA indicator I've been using for a long time.(In MT5 first bar is 0? but this indicator still runs fine. MQL5 running in MT4 is really confusing.) Today I'm trying to add a MA...