Expert Advisors and Automated Trading - page 143

Hello guys, I need help adding trailingstop into my EA. Please assist me in identifying the issue so that I can fix it and update my code.👇. if ( PositionSelect ( _Symbol ) == false ){ if (StdDevVal>StdDevAVGVal&& Ask > MaValine && MaValine > MAValue && MAValue > MAAvalue) { int ticket;
double calcLots( double riskPercent, double slPoints){ double ticksize = SymbolInfoDouble ( _Symbol , SYMBOL_TRADE_TICK_SIZE ); ticksize = NormalizeDouble (ticksize, _Digits ); double tickvalue = SymbolInfoDouble ( _Symbol , SYMBOL_TRADE_TICK_VALUE ); tickvalue = NormalizeDouble
I tested my EA in tester and suddenly discovered mysterious problem. EA does not trade YEN pairs except USDJPY . But has no problem with live trading, all yen pairs works there. Digits as always: int digits_adjust= 1 ; if (m_symbol. Digits ()== 3 || m_symbol. Digits ()== 5 ) digits_adjust=
So here is part of my program, in a function designed to loop through all the Symbols in Market Watch: Print ( "assetlist = " ,assetlist); bool selected = assetlist == "SELECTED" ? true : false ; Print ( "selected = " ,selected); if ( StringFind (assetlist, "," )< 0 ) number = SymbolsTotal
Hi, Just working with an EA, and would like to have some safeguards put in. Wondering if there is an EA that closes all positions based on account drawdown from max, say 35% drawdown, closes everything (making sure the entire account doesn't drop to zero. But I also want it to turn off the active
[Deleted]
  The Ultimate AI EA Project  (55   1 2 3 4 5 6)
Hello everyone. I would like to call upon every worthy programmer and trader to a crucial mission. A scientific project of a respectable standard, with the aim of easing the developing MQL programs using every tool available. A good start would be creating a public project then let anyone willing to
  spread filter  (12   1 2)
Hello I would like someone to help me on how to set up the spread filter
Hello, I have a problem, I can't understand and especially to make a line that will follow the high (or low) on the graph. I looked at several forums, articles, etc. but I can't do it, so I'm going to create this topic to get some help. Before I coded in pinescript and as the mql5 is completely
Hello MQL, I would like to ask that , what kind of error is it ? Thanks
Hey all, I'm experimenting with accessing the deal history, however, I can't seem to get the correct format specifier to properly display long values. Here's my code: HistorySelect ( 0 , TimeCurrent ()); int deals = HistoryDealsTotal (); ulong ticket; long pos_id; for ( int i = 0 ; i
Hello experts, Please any one suggest me the solution of this error. I am trying to validate the EA which trade on 2 currency pairs together
//+------------------------------------------------------------------+//| Script program start function                                &n...
Hi, I have coded an indicator, which creates trendlines (MT5). It is working without any problems with live ticks - but I am not able to get it working in strategy tester. Please have a look at the code below for creating the trendlines - with the test data, it should create a short horizontal line...
Hi im new into programming and i trying to figure out how to close a position on the opposide signal but i my tries dont work i watched different videos but no reult. i know the code is a bit messy but could someone help me please #include <Trade/Trade.mqh> input int TimeStartHour = 7 ; input int
Let's say we open a position with the CTrade class. CTrade t; t.Buy( 0.1 ); What is the quickest way to get the open price and ticket of this position or detect failure? As simple as that. Thank you
In the Journal it says successfully loaded but not taking the deal of operation. others working fine but what I want and better for me not working properly
Good day fellow traders, i am looking for an EA that can calculate the drawup of all account positions based on custom comment section , and display it later either in a table , or just in a text file.I couldnt find anything but maybe someone has an answer. Thank you very much , stay awesome
Pls help a line of code, it giving error ''INIT_FAILED' - expression not boolean' and not able to compile. //+------------------------------------------------------------------+ //| Above Below MA(barabashkakvn's edition).mq5 |
Hello I’m new to mql5 I’m trying to program a program with these functions but the compiler executes only the first one If I let the buy condition come first then I only get buy orders and if I let the sell condition come first, i get only sell orders What should i do to get both orders buy and sell
  enum symbo string  (21   1 2 3)
could someone provide guidance on how to do enum symbol selction am working on an multicurrency EA that i need to enum symbols selection example i want to have enum symbol( eurusd,0) 0 is to disable
I am trying to figure out how to convert a double that has zeros in front (eg, 0.0341 or 0.00020) to an integer (eg, 0.0341 to 341 or 0.00020 to 20). All zeros before the first non-zero digit should be dropped and the first non-zero digit to the last digit should form an integer
I am doing a number of calculations involving OHLC of candles. I want all my calculations to be reduced to the number of decimal places that appear on a given pair. For example, GBPUSD shows chart prices to 5 decimal places (eg, 1.12333) so, I would want my double values to be formatted to 5 decimal
A few days ago I'm trying to post an update of an EA on the market. In a previous thread I commented on the problem, but since the initial doubt was another, I imagine that it will not have reached many users. The thing is that I get this error. At the service desk they have not told me anything
Hi All, Does anyone know of an indicator or script or whatnot where you can place bids and offers on a DOM that is situated on the chart? Or maybe some other way where you can see the bids and offers in the futures markets? I know mt5 already has a DOM window but I was wanting something directly on
Dear All, I'm attracted by the world of automated trading and have started to study Mql5 since 5 months. I have read a lot of documents, articles and am trying to write my first simple EA as training. I fixed all errors and warning but it does not issue Orders. I'm checking it since a week but
this is my code and it is not placing an order:- import MetaTrader5 as mt5 import time mt5 .initialize() risk_percentage = 1 .0 balance = mt5 .account_info().balance risk_amount = balance * ( risk_percentage / 100.0 ) while True : candle_data = mt5 .copy_rates_from_pos( "XAUUSDm" , mt5
[Deleted]
  Never miss Ticks  (13   1 2)
Hi everyone, so I made a multi-symbol and multi-timeframe EA but the backtest and live results are different, some trades are missed on the live trade. How can this be fixed? Also the trailing stop seems to hit earlier compared to the backtest. Should I just make the EA single timeframe and symbol
Hello Sir I am trying to get the indicator bufffer details to my EA, but I am unable to get it, why? In the strategy tester visual screen all details are available but in the EA file I am not getting. The Super signal indicator code is as follows: <Incorrectly posted code deleted> In my EA I am
I need a help how to lock my EA/Script based on my login account number and one broker only such as "FXDD" ? example: my login number in my broker "FXDD" is 12345 , and I want my EA/Script can run only in that login number and FXDD broker. please help NOTE: better if you can give me an example of