Expert Advisors and Automated Trading - page 351

Can someone please code my EA to only execute once per hour bar? Sometimes I get entered into a trade and get stopped out within the same bar/hour, but since conditions are still met I get entered into another trade and get stopped out again and this results in multiple losing trades. If anyone...
hi. how can i change a position to non hedging position? i want to close a position by positionclose() not by opening another position. thank you
Hi everyone, when i use "PositionClose" function, instead of closing the open position, it opens a new position Contrary to the open position.  I dont know why...
  error 134  (3)
Hello when i want test my EA with minimum deposit $1 , i see error 134 (not enough money) , i haven't any inputs on my EA for initial deposit , guide me please . double Lot_Cal() { double l=(NormalizeDouble(((AccountBalance()* Percent_risk/100) )*0.01,Max_Digit)); if (l<Min_Lot) l=Min_Lot; if...
//+------------------------------------------------------------------+// DO NOT DELETE THIS HEADER// DELETING THIS HEADER IS COPYRIGHT INFRIGMENT //// Copyright ©2011, ForexEAdvisor.com// ForexEAdvisor Strategy Builder version 0...
Hello, are backtests really realiable or are they only there to check if the EA works? Best regards.
Dear Traders, I have subscribed for a mt4 signal and my metatrader always calculates a wrong leverage (1:10) for all currency pairs. My broker confirmed that for example the EUR/USD leverage is currently 1:400. This subsequently leads to a wrong ratio of 0.7% (see below logfile content). 2016...
I am trying to limit the number of same type orders .for example if buy order is closed don't open another one in same bar .unfortunately the next code doesn't work extern int max_same_order=1; void OnTick() int closed_buys=0,closed_sells=0;...
Expert disparity problem.Backtest orders normal but live account diffrent. Hello Expert using MA for open trades.I check the Backtest it's open only 5 position and not close anything.But live account open position and close after 5 min then open another position.This orders not seen in the...
please contact me PM if you can help me! &nbsp;I have several EA's that are coded on this 920 build and i need to be able to use them on the current builds of MT4 not just 920 because my broker doesn't support old builds for MT4... &nbsp;waiting for your reply - i can pay some money for the help if...
[Deleted]
Hi, I have an Expert Advisor someone wrote for me a while back and one of the rules was to close all trades at weekends, start again at the open as forex gaps can be brutal. I want to remove this from the code but the person who did it originally is not about and I know nothing about code. I...
Hi, I've translated a Linear Regression Class from this site: http://david.swaim.com/cpp/linreg.htm written in C++. However, I'm getting some warnings when I compile my code and I don't know why or how to get rid of them. Can someone help please? Here's my translated code...
i am using an EA from point zero. the ea requires dll to be enabled but vps at mql5 doesn't allow. so what to do?
Hi, There's a way to identify if the OnTester call is for a regular or a forward test? It's called twice per test when the forward test is used, one of each time period. I just would like to identify which one it is. Thank you in advice.
Ok i have made this expert to get some numbers for another expert my make. I can't figure out why array maximum works fine but array minimum does not . they look the same to me ? Can someone tell me what wrong here thank you.
  Parabolic SAR  (3)
Hello, Sorry if this is very basic but I am trying to get a very basic Parabolic SAR EA. Is there one already created? Thanks
I have an .ex4 EA, which seems to be extremely good a loosing consistently. So, keeping the source code exactly the same so it opens positions when it see fit, but with the opposite of what the EA wants. I appreciate that this is a strange request, however, if anyone has any simple ideas I would...
Hi, I do have problems with the strategy tester and would like to know if the iOpen() and iClose() functions do work with it regulary. Unfortunataly the markets are closed at the weekend, otherwise i would have tested it live.    The EA hasn´t worked, so a wrote the function into a...
Hi everybody. I am starting to develop EA on MetaTrader 5 and I am having some problems to test it with bovespa. I took the example in https://www.mql5.com/en/articles/100 to understand the sintax and develop my algorithm on it because a lot of treatments are already implemented in this...
DEAR ALL IM a newbie and an agent from Dallas (Pepperstones) has put me in touch..looking for someone to discuss a simple trading strategy involving a 21 day EMA and candles that move so many sigma(standard deviations up or down) away from a 16 candle average...am I making any sense? Trades will be...
I am interested in automating the new Strategy Tester for MT5. Why? Rather than manually running the Strategy Tester against my EA's with different input parameters, capturing the output reports and comparing them... I hope to do so programmatically. An MQL5 script would be perfect. Is this...
Hi there, I'm a programmer but new to MQL5. I've created an indicator that uses %R to determine buy or sell based on over-bought or over-sold stock. When I drag the indicator onto the chart I get DOWN_ARROW and UP_ARROW indicators fine. I wrote an EA to automate opening and closing positions based...
Hello As I haven't worked with creating clickable objects on a chart yet. Can someone give me a code that - Creates a button that closes all active trades once clicked - Creates an text box that takes number input and a submit button that reads the number into the EA. It will help me get a...
  Please help: Spread  (17   1 2)
Hello, I downloaded and imported the 1-minute data from FXDD and use it for my backtests. I realized that no matter what I define for "spread" on the strategy tester, results are the same. So I wonder whether all backtest results will be flawed and why exactly (fixed spread from the data?), so...
I went into this problem recently. I use Trade.PositionClose from the library to close a position. Looking at its code, it uses TRADE_ACTION_CLOSE_BY, which means it is closing by opening a trade in the opposite direction. Problem is that on a pair, trade is disabled. Info says that this symbol is...
Hello, how many trades per week is not considered "Too frequent"? Does this impact on the rank of the signals? Is there a way to know what is the position in the rank for a signal provider ? Thank you
Good day! It is possible that there is a similar topic but couldn't find it in a hurry. So my quiestion: at "trading signals", if the comment column shows "cancelled", does that affect the overall performance of the given signal? For example, if someone cancels his or her trade with -100 dollar...
Howdy Traders, Ideally I would like to have the following workflow 1. Edit EA in MetaEditor 2. Compile 3. Run in Strategy Tester 4. Stop test if I see something I need to change 5. Edit EA in MetaEditor 6. Compile 7. Run Strategty Tester again   However what I have found is that...
Dear all, These lines below shows you an issue I am experiencing I started my EA just a bit before 11 pm GMT on a sunday. There was a signal (according to my EA) but the EA did not take any trade until the midnight. Now, I am not so familiar with the TimeDayOfweek function but apparently it codes...
  Order History  (11   1 2)
Hello, i try to get out the pips of the closed trades, i had the idea, to count the difference between order openprice and orderclose preise void OnTick()&nbsp;&nbsp;{&nbsp;&nbsp; double Profit_Buy; double Profit_Sell; double Profit;// retrieving info from trade history...