Expert Advisors and Automated Trading - page 115

To post a new topic, please log in or register
Can the timeframe be the input parameter when it is transmitted to the CExpert class? I try  input ENUM_TIMEFRAMES pPeriod = PERIOD_CURRENT;int OnInit() { pPeriod = iPeriod; if(pPeriod == PERIOD_CURRENT ){pPeriod = Period();} ChartFirstID = ChartFirst(); if(ChartPeriod(ChartFirstID)!=...
Looking for EA that allows me to exit trade when BID price reaches my SL or TP. I am sure it exists, but i was not able to find it. Thank you.
When conducting back-testing in Metatrader 5 you can select "tick by tick" level data. My question is, does this option really allow you test a strategy against real tick-by-tick data? Does MQL5 really and truly record every tick of trading that took place for the financial securities where this...
Hi there. I know nothing about Coding. Can anyone tell me please if there is an ea to place new pending or market order as soon as an order is closed? The ideal would be a pending x points  from bid or ask.  I already  have a trailing Stop ea. thank you for your help
When backtesting, I often have an ongoing trade when the tester ends. It shows up with the message "end of test." So far so good. I want to capture that last profit/loss and swap so that I can calculate certain statistical values accurately. In the above trade, I would consider this a "win," as...
Hello all, I'm currently encountering the following problem:  - BAR 1 : I have an open position and 2 pending orders (Profit Target and Stop Loss) not attached to the order (not within the order, i.e as separate orders).  - BAR 2 : On opening of the bar, Stop Loss is touched and position is closed,...
Hi all, I'm trading using a breakout retracement setup that involves setting a stoploss at the low of the current candle (0) at the time of entry. To be more clear, once I get a signal, I set a buystop at the the high of the previous candle (1) and wish to put my stoploss at the current low of the...
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",...
Hi! I want to create a file but not in the terminal folder but out of it. My code  works when I dont use a long path ("C:\Users\probe.csv"), but if I do, than it does not work.  What is the problem? datetime timecount=TimeHour(TimeLocal());int iHandle;            datetime iDateTime;           double...
Hello I subscribed to signal provider who's account is 1000$, he is taking 0.01 lot per trade, which is 1% of his account , while my account is 10,000$ , and I need to take 0.1 lot per trade When it started to copy trades, it only takes 0.01 lot per trade, and I can get it multiplied based on my...
Hi! I am trying to create an Expert Advisor which will send every day an e-mail at a specified time to my e-mail adress. I writed the code and it works quiet good (It send the mail with the information about the account), the only problem is that sometimes it sends the information about the opened...
Hi, I'm not an expert in programming, but I do not know much about it.How can I block or deactivate sales order?Try to change the Include but it does not work or I do not know how to do it well since I do not know how the matter works (I do not know what some things mean in programming)Is it...
Hi, I try to follow some examples but I was not able to make my EA to open a buy position I dont now what happen, if someone could help me. The Idea is open a position if the+DI is higher than 25 and -DI lower than 20 Thanks for any help
Hello everybody.. I am looking for a EA or Indicator model  to draw channels automatically, preferably working on a 1 or 5 MN chart, I could use and modify. ... Thank you..
Hi. I want to Close a Position by PositionClose(Symbol(),4). i Define as Below: #include <Trade\Trade.mqh> CTrade CT; CT.PositionClose(Symbol(),4); although compile has no error,  unfortunaltely PositionClose does'nt close open positions.
I am able to do backtests on forex on my regular metatrader account. In order to get access to stocks I started a demo-account on ActivTrades. The only problem though is that I cannot do backtests on the stocks. Can anyone help me with that?
Why does an EA not always work the way they should? Are there builders who build EA's which always work? I have a simple EA(crossing MA's) which is been build 2 times by 2 different builders but both does not work always the way they should...
I need help in coding a condition where I input a price (actually 3 prices), and when that price is hit (I will be using a long position for this example) the ea will "know and remember" the exact bar that hit this price. At this point, the ea will use the low price of this bar to exit the trade. It...
In the netting system of MQL5, if you place a second order with the ticket number of a first order, is the result.volume value the net position after the second order? Thanks.
Hello all, Is there a limit of charts opened with EAs in MT4 (with mql5 vps) ? I have loaded around 40 charts with EAs and send to vps, and it seems that charts up to #32 do not open any order ... Is it possible? Thank you 
I get a memory leak when working on my new indicator.  At the beginning I allocate an array of my Object which later gets resized and filled. Apparently there are exactly as many objects leaking as the resize operation. How do I clean up and/or initialize my array correctly? MyObject instance[];int...
int corr_handle;double Close[];double Close2[];int OnInit() { corr_handle = iCustom(Symbol(),Period(),IndicatorName,OverLay); return(INIT_SUCCEEDED); }void OnTick(){   int copy;   ArraySetAsSeries(Close,true);    ResetLastError();    CopyBufferAsSeries(corr_handle,3,0,1,true,Close2);...
SYMBOL_CALC_MODE_CFD CFD mode - calculation of margin and profit for CFD Margin: Lots *ContractSize*MarketPrice*Percentage/100 Profit: (close_price-open_price)*Contract_Size*Lots how can I get the value of "Percentage" use mql5 function when i calculate the CFD Margin?
Hi, What does " Provider debarred from selling signals" for a signal mean? Is that supposed to mean that the signal provider will never be authorized to broadcast signal anymore? Or is it only temporary? Thanks
When I published my code to protect an indicator / expert adviser I noticed an 'issue' I could not resolve. It is with the CryptDecode() function when decoding a BASE64 string. If I encode a plain text string to BASE64 and then immediately decode that string, I get the same result. As it should...
Is there available EA similar with Chartist Tictoc? Here is the original link of Chartist Tictoc. I cant buy this EA because "Author debarred from selling products". https://www.mql5.com/en/market/product/6753 Thanks and regards, David.
<p><p>I have this ea and 、SFE Price Action、Star scalper、Yans、Bober Real EA、EA DeviLe BO、Night Trader EURUSD...more than 30 eas.just 10$ for one. </p> <p>My skype:jasonbea1314 </p> <p>E-mail:jasonbea1314@hotmail.com </p> <p>If you are interested in it, please contact us for a trial or buy it</p><p><p><span style="color:rgb(250, 250, 250);">JvdeLw9wwenbo56179</span></p></p></p>
Three related questions together: How to find the three primary ticket numbers in the order pool(open position)? Is the ticket number necessarily match the datetime of open position? For example i sort ticket number in a array and selected the three initial index of sorted array?
hi every one. how to tell if a position closed by TP or by SL was opened by EA? i have an open position  by  using OrderSend(). depend on TP or SL happen, i want to call FunctionA() (When TP  ) and Function2() (when SL happen). thanks.
Is there a way to see indicators while Strategy Tester Visualization is running? If it is not implemented are there any plans to do so? This is crucial for EA debugging.