Expert Advisors and Automated Trading - page 278

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
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.
Hi everyone I am currently testing the results of an EA and would like to know the spread with which it opens each operation, so I have the idea of adding that data to the comment when opening the operation: "Name of my EA" + "spread". The way I'm doing it is: extern string co = "My custom EA ";...
Hi! I have problem with my code! I want if orderlots >= lotb then it will stop trading and wait for new condition! However it didnt stop and countinute trade until profitable result...
Hi guys, I`ve experienced some strange behaviour. Sometime I got a strange value back from the used indicator within the EA I`m writing. It`s not EMPTY_VALUE and not DBL_MAX. BUY direction new 'SL_FRACTALS' tsl at -858993459
There have been similar topics discussed on here but I haven't seen one where this specific question has been fully answered. When using the open prices only method in the strategy tester, if a stop loss and take profit were set on the previous bar, and the market trades at or below the stop loss...
Hello ,  I have buy pro expert from mql5  I have 20 pairs for trades but after 4-5 hours of Metatrader lunch and ea open pending orders is deletng and after 1 second again open then deleted (etc) , the developer also didnot know what is these issue these problem happen for me only :( these expert is...