MQL4 and MetaTrader 4 - page 90

  What's wrong with this code!  (11   1 2)
Hello This code should give price at 12:20 and add it to x Then check every thick , and when Ask price is equal to x- 300 * Point then set order while order not equal to 0 (this is for low that code maximum order once a day) But not work!! Please help me Thanks #define DAY 86400 // day is 86400
I am a project manager and want to learn MQL. I know JavaScript (a little). Trading is my obsession. Can someone please point me in the direction of online learning sources. What else would help is a general data library
I guess I should be asking if I can actually get OrdersHistoryTotal() and limit the return to show the closed trades for today only ? I mean I know I can Print(OrdersHistoryTotal()); and this will give me the total orders of whatever I select in the tab of the account history. If I select Account
There are two buffers in Schaff Trend Cycle but only one is shown, i made visible both and what you see in the picture below is the pleasing result of this modification: schaff_trend_cycle.mq4
//+------------------------------------------------------------------+ //| ProjectName | //| Copyright 2018, CompanyName | //| | //+------------------------------------------------------------------+ #property
Trendline or Horizontal line order after candle Close : after take order Trendlin change its Color and Deactive
Hello, My custom indicator uses price action and other indicator info from higher timeframes which I use to determine various parameters to assess the confidence level of the trade setup. While this works fine in real time, the higher time frame parameters don't seem to refresh when running the
Hi all, I m totally new to EA, and I just copy the code from website but i didnt know how to add in the stop lost for my open order.. Here is the code looks like input int SmallSMA= 20 ; input int BigSMA= 50 ; void OnTick () { // We create a string variable for the signal string signal = "" ;
Hello, Does anyone know the exact sequence of orderexecution from the time it’s placed by the trader (via OrderSend()) to the time it gets executedon the trade server? My current understanding is that once any order(pending or market) is placed by the trader on MT4 client, it gets passed tothe MT4...
Hello, I'm not a MQL4 expert but i was trying to develope the following idea. I would want to creat an EA which could get the number of parameters and buffers(outputs) from a custom indicator , so i can use that information to implement it on the iCustom() function. This will be use to backtest
{ StopLoss = NormalizeDouble ((Bid - ( 15 *pipstotrade* Point ())), SymbolInfoInteger (CurrentSymbol, SYMBOL_DIGITS )); TakeProfit = NormalizeDouble ((Bid + ( 30 *pipstotrade* Point ())), SymbolInfoInteger (CurrentSymbol, SYMBOL_DIGITS )); trade.PositionOpen(CurrentSymbol, ORDER_TYPE_BUY , lotsize
I have started an EA that will place either BUY or SELL orders based on certain criteria. This EA will run on multiple charts at the same time and will place orders in many different symbols. When a certain condition appears (say price closing below the 11 EMA), I want to close all BUY orders for
  StopOut EA  (3)
//+------------------------------------------------------------------+ //| Stopper.mq4 | //| Copyright 2020, MetaQuotes Software Corp. | //| |
In the past this code did not throw errors I understand the return value and wondered what changed to cause errors where none existed prior ? Can anyone see fault with my highlighted solution code below. It's not throwing errors but is there a flaw in doing this ? Old code commented and highlighted
I'm looking for an indicator, I'm not sure if it already exists, so I'm coming here to ask first. Basically it's just the total amount of pips from green candles and the total amount of pips from red candles within the given period. An example would be, a week of bullish movement on EURUSD, you
Hi, I want to get the indicator data from a separate window. I need to do it in universal way. I mean, doesn't matter if it is an RSI window or MACD or anything else. I want to collect the indicator data into an array, regardless of what indicator it is (in other words: i need to get the data
Hello Goodnight. I am writing an indicator, and I want to register, and keep it fixed on the screen, the price that was at the moment the circumstances occurred: in this case, the Bid of the moment in which the averages were crossed. Can someone guide me? What function I should be used? Thank you
Hi... I have an mql4 class and I have compiled it in meta editor on another pc successfully. But in the other computer, I keep getting errors like "'OP_BUY' - undeclared identifier" or "'Ask' - undeclared identifier". It seems that the editor tries to compile my file with mql5 compiler. How could I
Hi, I read about the new mql4(Build 600+) and already updated my EAs, now i have a question. How secure is the new protection against crackers and other types of executable cracking and modifying the code. EX: hex editing date of expiration, memory dumps, etc.. How secure is a simple time...
  Close all orders for Symbol  (14   1 2)
Sorry for my English I was using this function to close all opened orders for one symbol  if profit > xxx but the problem it close some of orders then the profit be <xxx and it stop closing other orders //--------------------------------- bool CloseDeleteAll(){    int total  =...
Hey there! When coding for someone... Do you sell just the ex4 file, or do you give away the mql4 too? Do you ask extra for the mql4 file? Asking those feeling comfortable answering this 😉 Cheers
Hello folks, I came across this old thread that allowed creating offline charts for non-standard timeframes. It was built for v509 and hasn't been updated for a long time. Is there a current version that builds offline charts in visual testing mode for standard
Hello These codes consist of two keys, the first key closes half of the first open trade and the second key closes completely. The keys work in the demo account but do not work in the real account. Please help me, What's problem?! void OnTick () { ButtonCreate( 0 , "closeHalf" , 0 , 10 , 350
It is giving me some Invalid LotSize 4051, any ideas why and what could I correct? I want to calculate the distance from one signal until the other one. Lets say the signals are very good but 'who is without a flaw'? Then, I want to calculate the lotsize for a Martingale if the 1st signal goes wrong
  Mt4 not working  (1)
Every time it said no connection
Hi 1. I have 2 charts, chart one is a EA for example MyEA.ex4 whis is working good, on chart 2 I would like to disable MyEA.ex4 and after a while enable ! Is this possible ?! - OR - 2. I have 2 charts, chart one is a EA for example MyEA.ex4, how to programm that only chart 1 is closing (removing)
Hi all! I need to put comments on the chart my EA is running on. The idea is to place them in the lower right corner, so that I can visualize them better. How do I put them there? Is it essential to create a text object to do it? Or can it be done with a comment
Hi, Is there a way to know when the stop button pressed in the tester for an indicator? I've found details how to do so in an EA but I can't seem to find the right search parameters/details in the manual to find out how to do so with an indicator. I just need to run a function when stop is
In my EA I open 2 orders at once.  Order #1 : set TakeProfit value ( TakeProfit value calculated based on ATR of the time of order placed ) Order #2 : do not set TakeProfit value at the opening Later on I want to run trailing stop for the "Order #2" and I need to pass the TakeProfit value I used in...
Hi All, I like to use MQL4 to shutdown metatrader at specific time. ( for example: shutdown MT4 at UTC 10 pm or 10 pm brokers time) I dont like to kill the MT4 process (via windows batch), in order to ensure, that all terminal closing procedures will be processed correctly. Can somebody please give