Expert Advisors and Automated Trading - page 42

To post a new topic, please log in or register
Hey guys, soo i started coding my first ea but ran into some problems. It keeps opening more than on position at each tick even though i try to tell it not to do that. Can anyone help this noob out a bit. I know it's probably something really stupid that i missed but any help is welcome....
Hello, This is the first time that I've used the keyword template so I'm not sure I'm using it correctly. I've modified Konstantin Gruzdev's CArrayRing buffer found here: https://www.mql5.com/en/code/1340 to allow any type to be added to the buffer. However, when i use it, the MT4 editor crashes...
Hey, I am looking for an simple EA, that close all open trades after a period of time (seconds, minutes or hours) I have found an EA that exactly does it "SimpleTimeBasedSL OrderManager EA v1.1" see attached file, but unfortunatley it closes also the pending orders, but I need an EA that closes only...
  Invalid Stops MQL5 / - TP (11   1 2)
Hi All, I have an issue with sending orders, due to  2018.10.22 23:53:13.079 Core 1 2017.03.15 19:00:00   failed modify #2 sell 0.03 EURUSD sl: 0.00000, tp: 0.00000 -> sl: 0.01000, tp: -0.01000 [Invalid stops] this kind of error. I believe all stops are normalized, adapted for stoplevel and i think...
Please help me with this problem as per the attachment.
Hi all, can anyone explain: why this code returns different Ask and Spread values for the same bar OPEN price from different test modes (tested on Open prices only mode and Every tick based on real ticks). Is there an error in my code or they shouldn't match at all? Regarding to this https://www...
extern double Zoom = 1.5 ; extern double Zone = 20 ;  void OnTick() { double zZone_a,zZone_b,a; zZone_a=Zone; zZone_b=Zone; OrdSlctZ= OrderSelect(numberall-1,SELECT_BY_POS); confZ_a=((Zone*Zoom)-Zone)/2; typeZ=OrderType() ;a= OrderOpenPrice()+confZ_a*Mypoint; OrderModify(OrderTicket(),a...
Hallo experts, Question is how to take value from custom indicator to strategy ? I build indicator with some signals and put it in with iCustom(.....); It works fine but :/ Is some solution how to export that bool vriables to strategy ? here is part from indicator : bool SetBuy = false; <-- this...
Hello, I want to take the values "buy" and "sell" from "indicator 1" and send them to my EA.Looking on the internet I saw the "iCustom function" but it returns a double value and I do not know how it works#property strict #property indicator_chart_window#property indicator_buffers 6#property...
Hi, When researching signals to copy, I often see a slightly greyed out section on the equity curve. Like this one for example... Does anyone know why it is greyed out at the start? What does that mean?
Hi,  i need some help comparing two elements of MA. Usually i have no problem with this,but this time is different.    ArrayResize(MA,MAdirectionPeriod);   ArraySetAsSeries(MA,true);   if(CopyBuffer(ma,0,0,MAdirectionPeriod,MA)!=MAdirectionPeriod)     {      Print("CopyBuffer from MA failed, no...
please i only need experienced coder for that are there coders to do 
Hi there, I am wondering about the tracking error you get with EAs. I have purchased an EA, use the same ECN broker and settings as the EA vendor *but* only about 8 in 10 trades are the same as the vendor's published portfolio. Sometimes the vedor has trades I don't and vice versa, sometime I have...
Anyone here ever revoke the unused activation from different PC/VPS? now my activation 4 out of 5 but I now i only focus on 1 PC/VPS. Please help.
Hi, I need to add the email alert feature on my EA when a trade is opened and a trade is closed (by trailing stop/stop loss/take profit or just close the trade). I am aware of the function SendMail, but I have two issues that block my progress.  1. How to locate the most recent trade when sending...
hello, as the subject hopefully suggests, I have a label in a custom EA serving as a button, that allows users to click on and place pending orders.  I'd like to further indicate this to the user by changing the mouse-cursor. I've really made a lot of recherche but couldn' find a clue how to change...
I designed an EA using parabolic Sar and price action. But the EA continue to open multiple order in the same pair. And i only want to open a trade in a single pair. Any solution will be appreciated please. Here is the code for execution if(direction==1)       {         ssl=0;         stp=0;...
Hi, Im new at coding so I've been trying write simple EA's. One of them is an Asc_trend ea that open a market order when the blue dot appears and reverse the position when the pink ball appears. I cant make the EA do this logic, can somebody help me to find where's the problem? thanks...
Right now I'm working with the Bollinger Bands on the daily timeframe, buying when price goes below the lower band and selling when prices goes above the upper band. However, when I run this code below in the Strategy Tester the bollinger bands are updated with every tick. I would like to only have...
Hi guys! I'm testing/developing an EA and today was my first time using it live, but demo account yet. Analyzing logs, I found a odd situation and I'm not sure if this is normal or an error: 2018.10.22 09:08:19.257 Experts expert MinhaEstrategia2 (WINZ18,M1) loaded successfully2018.10.22 09:08:21...
Is it  possible to code an ea to take profits  lets say  30 pips, 50 pips and 150 pips. For example, on today's trade, the ea  takes profit at 30 pips, next trade, take profit at 50 pips and the next, 150 pips. Not necessarily in the same order but simply avoiding a single tp value. Anyone can give...
Hi guys,      if(Bid<upper[0] && Open[0]>upper[0] && MA[0]<MA[1] )      {      Print("---------- SELL ------------------");      for(int i = PositionsTotal()-1;i>=0;i--)      {       if(!position.SelectByIndex(i))        continue;       if(position.Magic()==MagicNumber && position.Symbol()==_Symbol...
Hi all  coders, Im aPhong & new to coding!  Lets say I have a open oder in my terminal & I want to manage it by an EA so that my TP & SL are not limited by brokers like mt4 default right now. Im teaching myself mql but at the moment I don’t know how to code it …but I think we should keep it as...
Hi, I have a question, is it possible to import the actual and previous data of an economic event into my code as a variable? Thanks
Trying to update a product in the market to version 1.1 from 1.0 but automatic validation keeps giving this error even after my terminal updated to the latest version(build 1915). test on EURUSD,H1 (netting) 'MA_Strategies_EA_mt5.ex5' has newer unsupported version, please update your client terminal...
Hi My wish is that I am able to accurately set a take-profit to breakeven when there can be any number of regular market orders and activated limit orders. But this was not going very good on freelancer as this was guessed to be some kind of averaging system that actually made the target prices alot...
Hallo, I dont understand what is wrong this : Here you can see actual value in comment but its different than value of MA-line on chart :( void OnTick() { Comment ("Linear MA = ",MA_Linear()," ","Exponential MA = ",MA_Exponential()); }double MA_Linear(){   double MA_Linear_Array [];...
Need coding help for simple martingale EA. I coded this. Anyone can lend a helping hand to make it work? I need help with: 1. opening 20 martingale orders at this price:Code: Select all extern double entry_order1=1.31999;extern double entry_order2=1.31989;extern double entry_order3=1.31979;extern...
Hello Community, Sorry if this question is an idiotic one, but I am rather new to this whole MQL thing. I am coding a small expert advisor, and would like the following to be achieved:  If any of my buy orders, hits its stop loss, I would like to stop all operations  and jump to next bar, ( I am...
Is that possible to show inputs in the report? google doesn't help much.