I want an expert who opens a buy trade every 60 minutes and puts the stop loss at -150 points, and as the price increases 150 points, the stop loss moves 150 points, and if the price decreases, the stop loss does not move
New to this so bear with me. When I run this, the EA makes trades as you would expect //sell if (signal == "sell" && PositionsTotal ()< 1 ) trade.Sell( 0.10 , NULL ,Bid, 0 ,(Bid- 150 * _Point ), NULL ); //buy if (signal == "buy" && PositionsTotal ()< 1 )
Hello, I have an EA with 100 different strategies, each set with a different magic number. I backtest this in MT4 and there are hundreds of trades created. However, I do not see the magic numbers anywhere on the strategy tester - people in the forum have suggested using the print function, but
Hello I have an EA and I don't have the source code and I cannot modify it I activate it for multiple pairs and when he open a trade in one of the pairs I want to close the EA of the other pairs and only hold it in the pair the order was opened in
Hi guys, Does anyone here have a simple hedging EA ? One that hedges and does nothing else ? It should simply keep the balance between Buys and Sells, that's all, without deleting pending orders, PTs and SLs. So, if on a chart a 0.05 buy position closes, then the Hedging EA should immediately open a
Hi, I have made an EA with a custom optimization criteria of "win rate" for testing binary options strategies. However the charts in the Results tab are based on Profitability. Is there a way I can apply my custom criteria (win rate) data to the charts to show that instead? It would be really nice
Hi! I am trying to backtest an strategy and i don't want to enter any position on fridays. I try using this code to get the day of the week of the candle,but get the following error. MqlDateTime herenow[]; CopyTime(_Symbol,_Period,0,0,herenow); 'CopyTime' - no one of the overloads can be applied to
Hello. Can Anybody help me? I found the following code that works on MT4 to toggle AutoTrading button: #include <WinUser32.mqh>#import "user32.dll"int GetAncestor(int,int);#define MT4_WMCMD_EXPERTS 33020#importvoid OnTick() { int main=GetAncestor(WindowHandle(Symbol(),Period()),2/GA_ROOT/);...
Hello, I have two questions. 1. What is the actual definition of "pip." On the EUR/USD, I always thought 1 pip referred to the 4th decimal place. But I'm seeing when changing the inputs of an EA that it seems to sometimes refer to the 4th, and sometimes to the 5th. For example, when I change the
Hello, I have the following problem: In my expert advisor, I sometimes have to call "CopyBuffer" on every tick. This works perfectly in combination with any of the standard indicator handles. However, when applying iCustom to the indicator handle of CopyBuffer, a new indicator window is being...
//for LongEntry Condition if (glongEntry == true ) { if ( PositionsTotal () == 0 ) { double buyStopLoss = BuyStopLoss( _Symbol ,StopLoss); double buyTakeProfit = BuyTakeProfit( _Symbol ,TakeProfit); gbuyTicket1 = Trade.Buy(
I was wondering how much of a performance hit there was. I'm assuming there are no issues utilising all cores
I understand that the demo account broker sets the commissions so that when you backtest they are locked in. Is there a way get around this? Are there any brokers that allow you to set zero commission for a backtest? Thanks
I made my own indicator that has a separate window where it shows buttons. Alone it works like it should. When i import it with the iCutsom function , the indicator doesn't get shown at all and also the Buffer Values stay empty. What can i do to make it work? int Gui; int OnInit () { Gui =
Hi, Some of the EAs that is on the market can be activated on a demo account, some of them can't. I have published som EAs on the market and I want to know how to get it to run on a demo account. I have searched a lot but I cant find the solution. Does anyone know and could share it with me? Best
This code of mine was not counting only buy positions it count also sell position but I want it to count it separately to have a value of how many buy and sell position I have. Please help me find the problem. #include <Trade\Trade.mqh> CTrade trade; void OnTick () { Comment ( "BUY = "
I have an issue, where after adding custom symbol with daily data the expert advisors have trouble with proper testing. After the testing is finished, the result is 0 or close to 0 profit . Tried with different EA and on other built in symbols so assume, there is a problem with the custom symbol
Simpe SellLimit script dont work - EURUSD Work fine in Advisor. But dont work in Script. #include <Trade\Trade.mqh> CTrade m_trade; void OnStart () { MqlRates rates_old[]; ArraySetAsSeries (rates_old, true ); int bars = CopyRates ( Symbol (), PERIOD_D1 , 0 , 10 , rates_old);
Hi, I searched the forum but I couldn't find anything about it. When multiple orders of an MT4 or MT5 EA have the same TP, the ticket numbers overlap making them illegible and therefore useless. I'd like to delete or hide this number or better still customize the text and color as per the attached
I am having an issue which I suppose should be extremely simple but I cannot solve it. Here is my EA: int counter = 1; OnTick(){ do stuff with counter; } My problem is, every time I launch another EA on a different pair, it changes my counter back to 1 in every EA. Obviously I know this is because
hi guys i tried to make system to back test my theory however when i try CoppyBuffer seems Maximum number it work is 35 ! so wondering if there is any workaround this limitation?! since i want whole year buffer eb examined oh btw its not for iCustom just official indicators buffered tnX for help in
Hi, I created a EA using Expert Advisor (generate), when i use backtest everything works fine, tp and sl works perfectly, but when i use the EA in the real market everything stops working. The EA opens a position and adds tp and sl but before the trade ends it starts another one but this time it...
Hi I have an EA which i gather information I need (Bar information and iMACD for example) and send it back to python for calculation and as what to do. I want to add a function that when I star EA, sync the data with python. here I explain more: python send the date and time of the last bar that has
Hi, New here, so please forgive the usual lack of understanding! I want to put a trailing stop loss on a trade, that only kicks if the trade moves a certain distance from the entry point. I've been trying to research EA's all day, but with no coding knowledge its baffling me. It doesnt seem like
Hello, I'm using an Sqlite database to do some documentations. It works perfect when making a single test. But during optimization the database access (= create some records) only works in the "OnTesterDeinit()" event. I tried to access a Sqlite Database during optimization in the OnTick event. But
I need a EMA crossover EA which will work on Multi time frame. Can anyone help ? Thanks :-)
Hello Guys, I attached an image where an order is placed with Price: 94460, Stop loss: 93960 and Take: 94560. But the transaction was closed with only 10 pts, at 94470. What I can do in my code to prevent this? Best Regards, Logs: 2020.10.06 23:47:32.962 2020.10.05 11:17:16 instant buy 1 WIN$D at
Good evening, I would like to use this open source ea for personal use but I realized that it does not have the comment function at the opening of orders, so it does not track us and you could get confused with other manually opened positions. it's possible? Can anyone help me? Thank you
About 60% down on this page describes the [tester] parameters that one would put into a configuration file to run a strategy test from the command line. https://www.metatrader5.com/en/terminal/help/start_advanced/start As examples: Model — tick generation mode (0 — "Every tick", 1 — "1 minute OHLC",...
I dont know how can i modify my SL and TP. I've tried allmost everything. I just can't change it to TP=50 and SL=20 pips. Anyone can help me? //+------------------------------------------------------------------+//| EMA EMA STOCH.mq5...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.