Expert Advisors and Automated Trading - page 70

I have used this line of code to open a long positions, and it works well: trade.PositionOpen( _Symbol , ORDER_TYPE_BUY , 1.0 , SymbolInfoDouble ( _Symbol , SYMBOL_ASK ), 0 , 0 , NULL ); However, when I try the same thing with the short positions, no sell position is opened: trade.PositionOpen(
Hello, I have a complete python-project that calculates signals for a history of data. For simplicity lets say I have a class like that: class PythonSignal: def next(self, price_data) -> int : signal = ... # do some calculation on my state and the specified data
Hi, I've never used any of the Metatrader software packages before but have decided to make the leap and give MT5 (demo - AlpariUK) a try. I downloaded an EA from the Code Base and put it in the Experts folder. When I re-start or refresh MT5 the EA dosn't show up. Is this because its only a demo...
hi guys im new in mql5. how can i modify a position in mql5 with out classes
Hey Guys, I rented a VPS last week. I want to change broker this week, can I use this VPS then for new broker? I rented 3 months... Thank you for help guys
2023.06.01 20:13:41.782 '4117408': order #67975146 buy stop 0.02 GBPJPY.pro at 174.085 activated at price 174.090 2023.06.01 20:13:41.782 '4117408': order #67940641 sell 0.02 GBPJPY.pro at 172.947 closed due stop-loss at price 174.090 Note: order numbers change when a pending order is filled. I
Hello, dear friends and experts. I have an expert advisor that works based on the the Trix indicator crosses. Its main part is coded as follows: //+------------------------------------------------------------------+ //| Expert tick function |
Hi, I ran an EA on Strategy Tester and it seems like the profit calculated for the trades does not match the lots and the pips. For example, as you can see in the picture there is a trade of 3.84 lots opened at 1.43611 and closed at 1.44403. This results in a profit of 2106.11 according to the...
Hello everyone, I am trying to modify pending orders with order tickets, The problem is that if I attach the EA on 2 or more different charts order tickets are mixed and this is a problem, can someone help me? below is the complete code of the logic. //---4 Count total orders placed by the EA on
To whom it may concern, I am facing the issue that apperently demo versions of market EAs (provided via mql5.com market) are incapable of writing files to the common/agent folder. To demonstrate the issue I wrote an EA, which I uploaded to the market ( https://www.mql5.com/en/market/product/97058 )
This is the code , there is no error on compile but its not executing order on market price : // Input parameters input double RiskPercentage = 0.4 ; // Risk percentage per trade input double TakeProfitPercentage = 0.7 ; // Take profit percentage per trade // Global variables int MagicNumber =
hi Can someone please point me in the right direction. I need an EA for MT4 that can: 1) Place and automatic buy and sell stop order at a certain time that I can set for example 9am. 1.1) I must be able to set the take profit and stop loss levels . 2) If any of these 2 positions gets stopped out
hello i created a panel with a button when you press the button the name of the object clicked on chart should appear on the panel here is part of the code that should display the name of the object click when i try it is always empty, however lparam, dparam show up normally if i replaced sparam
Hello, how to detect stop or take profit ? It seems that transaction is not providing this information. This is a transaction protocol of a single in and out by stop loss: HK      0       16:28:32.544    Core 1  2018.04.03 09:00:00   market sell 0.60 Ger30 sl: 12015.81 tp: 11958.61 (11987.51 / 11987...
Hi guys, I've been getting this error on my expert advisor when writing to csv file. Below is my code. input double CommissionPerLot = 5.0 ; // Commission per lot parameter //+------------------------------------------------------------------+ //| Expert Advisor initialization function
I backtested an EA on MT5 when I select "every tick based on real ticks ", I got a losing backtest : but when I choose "only ticks". I got a good result : the EA has a lot of positive reviews, so it's actually working live I think so why the discrepancy with real tick backtest ? I don't understand
In mql5, i made an ea that places multiple pending orders. Now when the stoploss of one of those gets triggered, i want to run a function that gets the input parameters (open price, stoploss and takeprofit) from that trade. I don't know how to start that funktion exactly when a stoploss gets
Hi all moderators and experts, I have written a MT5 EA in python, executing on window parallel under iMac M1. I use schedule function to recursively conduct trading strategies . The strange thing is the programme runs smoothly without error for most of the time, but, when it comes to 3 hours after
Hi I created a multi currency EA to work with 3 default symbols. At first the EA was working just fine until I added a 4th symbols and hell broke loose. So the issue is calculation of profits int he tester the values are just wrong. even when working with the 3 default symbols. I fail to understand
Hello, if i backtest my ea with visual mode. it trades and works perfect but if i close visual mode during backtesting or starting optimization, i can not see any trades? Can someone help me why this occurs? Thanks
  Vps ping  (8)
Hi i have question about the vps execution ping, i have rented a vps that shows that i have normaly about 7.4 ms of ping ( not in the local server in the right at the bottom ), i had run a EA that need a very high speed of execution but when it tr to send the other the execution ping before that
The results are same whatever leverage I change in MT5 Tester
Hello everyone, Please my EA is not opening orders when uploaded on VPS but it opens on my laptop prior to migration. Don't know what could be wrong
Good night everyone, how are you? I'm trying to create an EA code that does the following task: When turned on, it sends a random order (buy or sell) to the market, places fixed target and stop. When the target is hit, it opens another order of the same type. If the stop is hit, it opens the same
Hi everyone, I'm developing a multicurrency expert advisor that trades multiple pairs simultaneously, specifying the forex pairs in an input string. I've noticed that changing the order of them sometimes changes the results as well. What can be the reason? The EA opens only at the close of the
I have about 6 extern variables in my EA and I want to back test the MT5 optimizer. I have a Rayzen 9 16 core - 32 thread CPU with 8 extra cores from 2 x intel core i7 computers in my Local Network Agent farm. I select the desired variables and steps in the "inputs" tab. It should perform a lot of
I get this error: failed cancel order #10 sell stop 0.35 XAUUSD at 1310.86 sl: 1313.16 tp: 1308.56 [Invalid stops] I assume it is because the price is too close to the order before the EA sends a request to delete the order. I use this function to delete orders, and I do check for freeze level, but
if (mPosition.Profit() > 0 ) { double ask = NormalizeDouble ( SymbolInfoDouble ( _Symbol , SYMBOL_ASK ), _Digits ); double bid = NormalizeDouble ( SymbolInfoDouble ( _Symbol , SYMBOL_BID ), _Digits ); double oldSl =
Hi, I have recently purchased an EA and have been using it for a few weeks. I double check the EA page to check for update and found it is not available anymore. I wonder what do I do if I want to install this EA to other computer please? Can I download it from the market somehow? Or can I copy the
title... for now I've done this: To create a DLL (Dynamic Link Library) from Ta-Lib, you can follow these step-by-step instructions: Download Ta-Lib source code: Visit the official Ta-Lib website ( https://ta-lib.org/ ) and download the source code package suitable for your operating system. Extract