Expert Advisors and Automated Trading - page 208

Hi all,  Is it possible to do this? I'm opening a position with a order like this. 10 lots with stop loss and no take profit. CTrade t_buy;t_buy.OrderOpen(_Symbol, ORDER_TYPE_BUY_LIMIT, 10, 0, p, sl, 0, ORDER_TIME_DAY); Now when the order gets in (creates a position) I want to have 5 partial take...
Hi Folks, It seems like sometimes my EA is taking a little more time to send an order. As I'm trading in a very short of time (Scalping), I'm loosing money sometimes. So I'm trying to figure out if is there any part of my code is wasting time. The part below was extracted form OnTick. Void OnTick
Hi All, I have trawled through many of the previous questions regarding ST issues but so far have been unable to find a solution. So here goes: 1. I can test all indices in June and July except JPN225 which only runs successfully in July for some reason. 2. I have gone to the history centre and I'm
Hi everyone, sorry for my bad English. I'm new to the world of trading and c++ programming (just started a book to learn). Following the guides I was able to compile a mq5 file which draws a second Renko chart below the main EURUSD. ( Https://www.mql5.com/en/articles/792 ) Thanks to this graph I was
I have coded a robot but my knowledge of coding is limited so, obviously, I have added the functions I need but I see these are not working right. I am constantly modifying the code LIVE adding /if and /while according to what I am seeing in the market. So, my question is, Is there a preestablished
Hi all, thanks for this space. I'm currently building an EA that increments the operation's volume when the price goes above half of take profit's distance: stop loss is modified accordingly maximum loss admitted. Just to be more clear, here an example of a long position: Price Situation 1,1220
[Deleted]
Hi, What are the function I should look for in source code of a EA to disable display of indicators (internal and customised) after a backrest with visual and non-visual mode
I programmed an EA that opens either buy or sell trades depending on the signal from a custom indicator. The custom indicator gives a signal on candle A then the trade is taken on the following candle B. The problem i have is that, the signal is usually not stable, for example if the indicator gives
Hi. My problem is I bought an EA few days ago. I run tests on it, everything was okay it showed the deals then I tried to use it in real time for trading and it doing nothing. Is anyone got any idea what is the problem? I would be so thankful is someone will help me.
double closeh4x[]; ArraySetAsSeries (closeh4x, true ); CopyClose ( _Symbol , PERIOD_H4 , 0 , 30 ,closeh4x); double close26h4x=closeh4x[ 26 ]; //================ The error relates to the close price of the last 26th candle and states ' Array out of range' How do i fix this
I appreciate any help on this, been trying to find the answer for days. how to make not trade during let’s say 5 candles. So if the ea sends buy order, then it won’t trade again till 5 candles pass. I’ve only found how to not trade on the same candle (eg. trade only once per candle) but this is too
Hi, Can someone tell me whats wrongs with my trailing stop code? I keep getting invalid stops, I run the function during every tick . Any help would be greatly appreciated. //+------------------------------------------------------------------+ //|
I programmed a very neat EA that works well an a couple of pairs. Now instead of pulling it onto every chart I would like to have one EA run and handle multiple pairs at the same time. So far so good but there is one remaining issue that I have: In the documentation about getting values from
This is a basic question but I just want to be sure. If I buy an EA here in MQL5 community, can I use it for multiple accounts? I plan to run it first again on a demo before a live account.... and is it possible to run it simultaneously on multiple accounts on multiple platform instances in a VPS
Hi there I'm trying to make a function to trail stop after partial close orders but this partial close is executed only one time cause there is an SL condition to run it. How this can be done? if ( PositionGetDouble ( POSITION_PRICE_CURRENT )>PClose&& ( PositionGetDouble ( POSITION_SL )<
Hello friends. I would like to know if there are any articles that I understand about semi automation of metatrader 5. Example I say that I send a CALL or SIGNAL: Open EURUSD 1.6010 SL 1.6000 TP 1.6020 but that is pending order. I would like to know if you have any command line documentation for
hello, does someone has a piece of code in order to retrieve some data like bid and ask? I am using symbolselect() and refreshrates() but sometimes I cannot retrieve data
hi guys can anyone help me out on this one am getting wrong paramater counts … am sorry about that guys void BuyTrailingStop( string Symbol , double TrailingStop, double MinProfit, int MagicNumber, double MaxStopLoss) { for ( int Counter = 0 ; Counter <= OrdersTotal ()- 1 ; Counter++) {
I am still learning to code and this code was given as an introductory sample... It used ORDER_FILLING_FOK, but with both ORDER_FILLING_FOK and ORDER_FILLING_RETURN it gave an error as "unsupported filling mode". So i tried with ORDER_FILLING_IOC. Now it opened the order but didn't seem to close it
Hi, I get annoying problems with 2 indicators out of 4 used in my EA. Whatever I do, the EA fails to load them, even though they get compiled successfully into resources and the other 2 indicators work fine. They only work when I put the files into the indicator folder, which gives me the...
Hello, I have multiple indicators and various periods that I take into account to enter and exit a trade. What are the steps to put them together in an EA so that when conditions are right I enter or exit a trade? Can I use an existing library or template where I point to my various indicators and...
Hi, I have an EA I developed and have used it for a lot of months in real time account, when it worked fine. Recently I decided to do some changes in the setups used and that lead to me to test it in the Demo account, something I normally didn't do before. And now, surprisingly, it is finishing
handleATR = iATR ( _Symbol , PERIOD_D1 , 20 ); ArraySetAsSeries (arrayATR, true ); if ( CopyBuffer (handleATR, 0 , 0 , 40 , arrayATR) < 0 ) { Alert ( "ERROR: unable to copy atr. exiting..." ); return ( false ); } cannot copy atr data. Initialization returns false. how can i solve this problem
Hi Guys, I created an EA that do Long&Short operations based on ratio and also based on spread between two symbols. In order to view what is happening on the graph I create custom symbols to represent the Long&Short. However, creating the custom symbol by my program I didn't found how to set the
Hi there, I'm having trouble with my partial close function , it seems to be not working as I get same results both if true or false. These are the lines: if (PartialClose== true ){ for ( int i= 0 ;i< PositionsTotal ();i++){ // Same result with for(int i=PositionsTotal()-1;i>=0;i--){
Hi, please excuse my noob question, but why don't i see "Ask" and the rest of the predefined variables on the list anymore? and the MetaEditor is not recognizing this "Ask" which is supposed to be a predefined Variable
Hi everybody, I are format the amount for the balance whit this code: double AccountBalance = DoubleToString ( AccountInfoDouble ( ACCOUNT_BALANCE ), 2 ); Whit this var i get for example "140.56" and its fine, but if the amount is 1590785.90 i get "1590785.90". How i can get "1,590,785.90"
@William Roeder @vladimir250273 @VLADISLAV BUTOV @Vladimir @Ahmet Metin Yilmaz @Stanislav Ivanov @Keith Watford @nicholish en @Marco Y Anja Vlaskamp Hello guys sorry for taking your time ,but I have this big problem since I started making EAs.......! Why didnt Metatrader Create a predefined
Hello, sorry my noob question but is the following: in my LimitTakeProfit.mqh file, when I compile receive the following errors 'CSymbolInfo' - parameter passed as reference, variable expected LimitTakeProfit.mqh 55 56 'CArrayLong' - parameter passed as reference, variable expected
Hello, I search how to close mt5 properly in mql5. I have a python script which launch one by one severals expert advisor. My way in python is: for expert in expertArrays: # code to prepare the configuration file subprocess.call([mt5ExeFilePath, confOption], timeout = 15 ) Python