Expert Advisors and Automated Trading - page 166

double MA[]; // array for the indicator iMA int MA_handle; // handle of the indicator iMA //+------------------------------------------------------------------+ //| Expert initialization function |
I am writing an EA that places limit orders with expiration. Expiration is set to the datetime corresponding to a given number of bars after the current bar. I can get datetime from a past bar index using datetime CiTime::GetData(int index). However, I do not know how to get datetime from the index
Hi there, I just want to know if that possible to make an EA but only for closing our open trade when certain parameters have met! for example: I Manually open 3 trades at buy EURUSD .. whenever Completed bar close below EMA 12 LOW all those 3 buy open trades that we opened Manually will be closed...
Hello everyone, in my EA, at times when the ASK line is too far from the BID, the value received in the onTick event with " SymbolInfoDouble(_Symbol,SYMBOL_ASK) " does not match the value of the line in the graph, and it is not possible to do the necessary calculations correctly, because this
Hi Coders, I am new to coding ( only 4 months of experience) I have read the Expert Advisor Programming for MetaTrader 5 by Andrew Young But I still do not understand how code the Hull Moving Average Crossover to do the following : When the fast hull moving average crosses above the slow hull moving
[Deleted]
Dear Members I am facing an issue with Trailing Stop Loss and Closing Positions. Does having multiple Magic No in same EA can affect this ? The problem is strange, Trailing SL and Close methods works for some time and at others it does not. Any clue will be highly appreciated and hoping this is not
Hi all I would like to count pending orders properly by opening one pending order at a time. Unfortunately it opens many orders. I know I'm doing something wrong but I can not figure out what's wrong. Please help if you know whats the problem. Thank You. #property strict #include <Trade\Trade.mqh>
I want to know if you face the same problem. I mean when I changed parameter in EA (forex robot) , I sometimes face the problem that the parameter change is not applied. I don't know why. Have you had a same issues before? To fix the problem I think I can close all chart and attach EA again with a
I have been working on a simple EA, until I ran into some funny result. I cannot explain it, then I realize that by commenting/uncommenting a single print line will dramatically change your result. Definitely an alarming behavior. If anyone has any insight regarding this behavior, please share. I
Hello, I hope your making money and had an interesting day. I would like to know a bit about how to invalid volume error, during one of my ea back-tests around 2016 the bot stopped trading caused by an invalid volume error. I am new to meta trader five and this is one of the first successful EA's I
Hi everyone My EA has been coded by my developer but is entering candles on the end instead of the opening within 0.2 of a pip, can anyone tell me what could be done to fix EA to place trade faster on candle opening as enters trades 3 pips away and similar issues with exits when on 1 trade the EA
Hi, I am trying to place a buy stop and sell stop 1 pip above and below close price of the previous candle but keep getting invalid price error. I will appreciate insight on where I am going wrong. Below is what I have: //Import Trade Library #include<Trade\Trade.mqh> //Create an instance for Ctrade
Hi, people! In the middle of yesterday, my strategy backtester suddenly started to behave wierdly. Now, no matter the EA or setup I'm using, my trades are being closed as soon as they are opened, without hitting either SL or TP. Does anyone know why this is happening
  The NFP filter  (5)
Hi there community, I wrote recently a NFP filter. The backtests say that it is more profitable scalping during NFP (?) but the signal performance was horrible in fact after the last release. I'm thinking that these MT5 backtests are quite imprecise cause NFP gives certainly a kind of market
I can't read programming language at all, but I'm trying to create my own EA using generator in MQL5. It goes smoothly until I realized that this EA can't open multiple order. I'm using hedging technique, which is need open buy and sell at some point. Really appreciate if you can help me.. anyway
How do I get the close price after calling PositionClose? trade.PositionClose(ticket); Print ( "Close position @" , ???); Thank you
I was wondering if anyone would be kind enough to help with my lot size calculations. I have all the code working fine when the base currency is the same as the account currency. 1 I'm really struggling to understand what to do when the base currency isn't the same. I have looked in mql and general
Hi, Just a quick question about Service . Is a infinite loop , as shown below, safe to use in a MetaTrader 5 Services ? Or is there a better way? Because Services do not accept any events and therefore I can't use EventSetTimer() . Thanks :) #property service void DoSomething() { Print (
I have been trading now for over 10 years and my biggest failure is the psychology. I started to learn to code about 3 years ago and I am still no expert with loads still to learn! In the time that I have been learning I have programmed hundreds of EA's some of which work for a period of time then
The Alligator’s Jaw, the “Blue” line, is a 13-period Smoothed Moving Average, moved into the future by 8 bars what does it mean by ` moved into the future by 8 bars '? I did not find a corresponding concept in MA definition
Hi all, I am having an issue with an EA that I am using and was wondering if anyone could help me please? I am currently using Promax Gold EA V4.11, I do not have the source code for this EA. The EA opens a trade (Buy/Sell), and then averages down at a preset distance in points if price moves in the
I am testing Stochastic crosses and I have noticed that sometimes it fails when the cross occurs exactly when a new candle opens. This happens very often and I think too much precision is lost. Is this normal or is it a bug in my code? Is there any way that this does not happen? Here is my code, and
Hi guys, A few general questions about EAs, appreciate the help in advance: 1- I installed the EA on my laptop and I have several demo and real account active on my computer. Say that I drop the EA on one FX chart(i.e. activate the EA for that currency pair), will the EA place trade all the accounts
Hello everyone. I'm trying to get the Object Text, specifically the Anchor text from a custom indicator to use it as an input signal. I'm having some errors and I can't fix them. Could someone help me
From what I understand the current modelling of price data using 1 minute OHLC, sends 4 ticks (Open,High,Low,Close) of the 1 minute bar to the EA. Is there a way to send these 4 ticks from another time frame, for example the OHLC of 1 hour bars to the EA? My reasoning being that it would be the most
Hello All As a new user, I'm using MQL5 module in Python! All things are good, But a problem i have. I couldn't find any way to go through symbols at Market watch! The module's methods just list all instruments in the Metatrader and therefor just going through all instruments is possible! Something
Dear I want to build connection between EA and my member's cabinet for rent EA For example 1. Rent fee for a month is $10 2. Member deposit $20 to their wallet 3. Every month, their wallet balance will reduce $10 for rental fee then the EA will start open posisition 4. But, if their wallet out of
Anyone ported simdjson into MQL5? If not, can someone help in porting please? https://github.com/simdjson/simdjson/tree/master/singleheader In the above, only two files require porting: simdjson.cpp and simdjson.h I can volunteer to port this, however it would be good if someone can guide me