Expert Advisors and Automated Trading - page 152

To post a new topic, please log in or register
Is there anyway we can execute TP and SL in fast moving market without using script.
Hello friends, I am totally a novice at programming. Can somebody add trailing stop loss function to the attached Expert advisor. It should be active on all trades on the chart and close all trades when desired profit is achieved. All help will be greatly appreciated.
I wanted to start a share and reapply disscussion on forex mechanical trading. I dont want anyone to share their trading secrets, however, I want to ask has anyone of you succeeded in developing a robust forex trading strategy?   I am a newbie in the field but after testing some handfull...
Expert started on MT5 on PC, how to control it by internet or SMS? Send buy/sell commands etc.
I can't find metaeditor icon on metatrader4 mobile platform.
I have an EA I had developed, and there are 5 different ways to exit the trade. So I'm testing it on the same pair with same trading hours.  My trade that exits by opposing signal is still open. It opened within the trading hours I specified, but it's now past the trading hours I had specified...
Client Terminal Build and Version (32 or 64 bit) MT4 ver 4.988 With Compiler ver. 5.1351 Problem description Compiler doesn't create EX4 version that places stop losses, while previous compilers do compile an EX4 that places stop losses. Previous versions of MT4 4.950 and Compiler version 5...
  error in RSI expert (31   1 2 3 4)
Hi guide some error is coming. 2013.04.11 22:00:15 RSI new (NATGASAPR13,M10) CTrade::OrderSend: market buy 1.00 NATGASAPR13 sl: 219.8 tp: 229.8 [invalid order] 2013.04.11 22:10:16 RSI new (NATGASAPR13,M10) CTrade::OrderSend: market sell 1.00 NATGASAPR13 sl: 229.3 tp: 219.3 [invalid...
I can send a test email fine from mt4.  But I would like an email once an Expert Advisor places a trade. Is there a little line of code I could include in the EA. I would just like the subject of the email to be the pair traded, buy or sell and price traded.  Then another email would go...
Hi, I'm making an EA to work with fractals and each time that appears an upper/lower fractal and its > or < than EMA it should generate new orders or modify the existing ones and in open orders it should change only the SL. At beginning it puts the buy stop order, change it and after some...
[Deleted]
https://www.mql5.com/en/code/10647
Kindly add trailing stop function to this EA. I ordered from freelance but developer is not available to modify EA for me.
Hello,  i face this error and i can't find the solution  return code of the server 3396333104  i'm using this function    uint SendRandomPendingOrder(long const magic_number,string Symbol_name,double open_price,string order_type,double lot,double Stop_Loss,double Take_Profit)   { //--- prepare a...
Hi   During the testing the SL and TP were not triggered when the price was reached. Has anyone experienced this ? This happened several times. I appreciate any help . 
Hey there, WebRequest() isn't working with indicators, for whatever reason, therefore I need a possibility to load a file from a http or ftp. The samples I found to work with wininet.dll dont seem to work, any of them produces errors and not results. I am not that familiar with internet stuff, so I...
Dear Community, I would like to know what makes an Expert Advisor to be universal (to attach on one chart and trade all symbols)? for the following code: #property copyright "Copyright © 2011, Krzysztof Sosnierz"#property link      ""// Current countersint...
Hello all, I have a script here that calculates a moving average of the last N mid prices (N = 5, mid price = bid+ask/2) at every book event, (10++ per second). My issue is about the simple calculation. I dont know if there is some kind of delay because of the loop that populates the array i...
Regularly I use the "Strategy tester" to optimize my expert. I was making analysis from 1-Oct-2015 However when I changed the computer, and install the MT4 again, the "Strategy tester" only allows me to simulate from Jun-2016, which is terribly short. Is there any way to force to a simulation...
Hello,  me and my friend made, what seems to be, a very good EA. We bought real tick by tick history, imported it in MT4 and backtested it since jan. 2007 to jul. 2016 (10 years), because we want it to be long term profitable.   We're testing it on live account for few months now and it seems to be...
Hi   I'm looking for a code which closes all open orders ( long and short ) for the current pair, when one of the orders hits TP or gets manually closed   Right now i'm struggling with the spread which causes not all orders to close due to the difference, and to me adding that code...
Hi guys! I need of a function that returns the number of orders in a specified pair of currency. PS: Fot MT4 Someone can help me?
Have anyone of you had the case when Open prices and Control Points have quite nice growth of equity vs Every tick has huge drawdowns for the same strategy?What do you do in this situation? Is it reasonable to update the EA to work only on new bars/ once per bar etc? Strategy works on H1 timeline.
Hello traders, I need your expertise to find an EA that can open more than one trade ( if needed by the criteria). For example, the Buy order should be opened if the Stochastic is crossing up the 20 level and close the trade when the Stochastic reaches 80 level. Also the EA should open a Sell...
I have some historical file contains a records in a structure (datetime, bid price). I can read it into memory. Is there exists some memory buffer for analyse methods? How can I use it to test my automated strategy?   
Hi,   I've been using CExpertSignal and it's data access methods (Open, Close, High, Low) from the series mask successfully for a single time frame. However I'd like to expand it to use multiple timeframes and can't seem to find any documentation on how to achieve it with the base classes....
Hi,   A have a downloaded form mql5 indicator which work on chart. So I don't have a code. There is possibility to make a ea which will be put orders when a indicator generate a signal? indicator genereate signal buy/sell and I am almost every time too late because it work fine only when is...
double getLots(double lt) ( double marginrequired = MarketInfo(Symbol(), MODE_MARGINREQUIRED); double freemargin = AccountFreeMargin(); if(freemargin > (marginrequired * lt)) { return(lt); } double result = freemargin / marginrequired; result =...
I found a free ex4 expert that is shared on the web many years ago it looks promising it uses a fixed big stoploss (over 100 pips)   I would like to optimize this stoploss but the problem is that it is not an extern variable  so it doesn't appear in the expert inputs when attaching...
 Hi there,   i got a problem with this error code (10036). As far as I understand the MQL5 Documentation, this error says "Position with the specified POSITION_IDENTIFIER has already been closed" How do I solve this Error? Any hints or do you need more data from me...
Is this possible? It would be awesome if I could see these levels on the tick chart. If it's not possible would it be possible to release the source code for it so that I can add these myself? Cheers