Expert Advisors and Automated Trading - page 66

To post a new topic, please log in or register
Hello,  Please, I am using the copyticks to check the ticks for buy and sell. When I read the values of the Volume and Price Last ticks, they are zero. For the Brazilian market is working, but for the Forex does not. Code: CopyTicks (_Symbol, last_tick, COPY_TICKS_INFO, 0,1); I can not use...
Comments that do not relate to the "double variable with wrong decimal cases", have been moved into this topic.
Hi everybody, I'm building an Expert Advisor to work with FOREX and I'm using the following code to load an MqlTick structure array. The function works right but "last" and "volume" values of the MqlTick structures are always zero during the whole day. Does anyone know why? Thanks in advance. Bye....
I am trying to export symbol rates to a CSV file using this code, that works fine for symbols that work with 3 decimals (like CADJPY), but not for those that work with 5 decimals (like AUDCAD): void OnStart() {           string symbolName = Symbol(); //o _Symbol   ENUM_TIMEFRAMES period = Period();...
Hi guys, I have faced a problem which I really worked on but I couldn't solve it. I want to partially close a position by pending order, the reason I want to use pending order is I want it as an SL but Partial SL. I wrote the code below but pending order results new position an doesn't affect the...
Hi All, I work with MQL5 and i make statistics to know when its most likely for an event to occur and i get consistent results mapped to an hour of the day, but at what time zone does this data belong ? as i run my program on a AWS machine, which is different timezone, and i want to know how to...
  error? (3)
   switch (MarketInfo(Symbol(), MODE_MINLOT)) {  illegal expression
I want to get the last 5 bar high in MQL5 how to do it? THANKS
After the last unsolved mystery of MT4 tester peculiarities here comes the next. Wonder if forum gurus could take a look and give their wise opinions. After noticing some promising posts and links here on FFT and SSA and Alglib I decided to try myself as well. So, I integrated Alglib to my dll. Got...
Hello All Forex FX Masters Here, Im Looking For Help from you all guys. I Need EA Which Can Set Stop Loss, Trailing Stop & Trailing Step. But here No Need Take Profit Because Stop Loss Will Act As Take Profit Function. But Please See My Explanation In Detail Because I know that There Are Many EA...
Hello! I am a bit confused about the volume param in the PositionOpen function https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradepositionopen The function definition does not give you any info on it, so I do not know what the volume is based on but I am guessing that it means...
my code works in strategy tester but does not work in live...Please assist//+------------------------------------------------------------------+//|                                                     t2018_21.mq5 |//|                        Copyright 2018, MetaQuotes Software Corp....
Hi again. Just read almost all I could find in forums on timeframe topic and got confused a lot. What I don't understand is : why even people ask what timeframe they tweak their EA to ? or why is it even important to have an EA for a specific timeframe and only use it on that TF ? why some people...
I've been mind-sketching an experimental EA for a few weeks now. i'm currently working on some sort of intelligence and learning abilities of the EA. so that it gets better and better on each trade it makes and each signal it finds. have done similar programs in other languages but MQL is still...
Hello, I am looking for an MQL5 EA that can serve as a base to implement my own strategy. A kind of MQL5 EA skeleton. Thanks. Pierre
is the following code fail-proof for the mentioned purpose? datetime RightNow;int SESSION_TIME_LIMIT = 3; // in hoursOnInit(){datetime StartTime = TimeCurrent();EventSetTimer(15); // timer tick set to 15 secondsvoid OnTimer(){        RightNow = TimeCurrent();        if(SESSION_TIME_LIMIT !=...
Hi, I am not a Professional in coding and I created an EA based on ZigZag and When I tested the EA I received the error code 4806 and the tester became very slow (5min candle took 20 minutes and more) because of double high or low as you can see in the photos: And MetaEditor tell me there are no...
Hit at all, I'm studying a simple EA taken from the example: Simple Expert Advisor https://book.mql4.com/samples/expert. I wrote the code from scratch (for a better understanding), following the same procedure of the framework, the same trading systems, same trading criteria, values parameter etc....
Hi, I need a simple EA to open a buy/sell order once it reaches '5' pips on any side from open price and close the trade at the end of the candle and repeat the same in the next candle. Also the stop loss and take profit to be defined. IF there already an EA available for this. Pls share, need it...
I am hearing from a couple traders that small brokers frown upon the use of trading robots and treat orders placed by robots differently; i.e.that orders placed by a robot get worse execution than those placed manually. Does anyone know anything to this effect? Have you ever had such an experience?...
Buy odh sell, how is the code for this? I have $ 10000 and I'm willing to risk type 2% (= $ 500) of this on a single trade. I want to calculate how much (lot) I can trade when StopLoss is placed. Also taking into account the existing spread. Can apply to both bay and sell orders. Thank you for tips,...
I am attempting to create a simple EA that uses only the Close Price of the Previous bar compared to an MA of 'x' periods. Parameters: If the Close Price of the Previous bar is Higher than MA, then Buy.  Close the trade when the Close Price of the Previous bar is below the MA. If the Close Price of...
Hi!  I have recently developed (i think) good EA, but I need someone to help me improving the code. There are some errors, and the EA doesn't execute all orders. Would someone do the test for me too because i think i dont have a complete history data for GBPUSD for which this EA was designed.  I'll...
BeLikeTrader
Guys maybe you can help me with this code that in MQL4  is working as expect but in MQL5 I receive some chinnese characters that I dont understand: void OnStart()  {//---      int handle=FileOpen("test.csv"...
OnInit I have ChartSetInteger(0, CHART_EVENT_OBJECT_CREATE, true); Creating an object on millisecond timer uint Span=1000; uint Next=GetTickCount()-Span;  int counter;void OnTimer()  {      if(Next<=(GetTickCount()+Span))     {              counter++;      string...
Hi, My EA is trading without errors during tests. When I enable automatic trading in production environment it does not do anything and it does not prompt any errors. The only thing this EA is different from another ones is that it checks 64 other stock prices during every tick... is this a problem?...
Hi, hope you don't find my question funny or pointless. I want to write an EA to consider all possible known signal-detecting patterns and techniques. have considered the following : Indicators : MACD (using its signal line) , Parabol SAR (when the dots going below/above the chart) , Moving Average...
Hello my EA worked fine until i've change the broker XM The positions wont close and gives me 2017.03.13 08:24:53.670 2017.03.01 00:42:32   Error closing position by EURUSD : 'Unsupported filling mode'  Total Positions (1) ‌The problem is that i have already filled the mode (i have already opened...
  Dots EA (2)
Hello Coders. I am testing this Dots Strategy from CompassFX. It is working fine and giving very good results with overall diversified pairs. So i need an EA for this strategy. I am testing 2 strategies. First strategy is based on purely Dots Indicator. Second strategy based on Dots indicator +...
hey guys... during the Backtest, my EA suddenly breaks and stops opening trades(because there's no margin)  one specific parameter uses ATR and giving me the problem... the calculation for takeprofit and stoploss using the indicators are correct... what is making me crazy is that it goes through...