Forum

Invalid volume

I get this error: failed instant buy 0.05 AUDCAD at 0.97083, close #2 sell 0.05 AUDCAD 0.97620111 [ Invalid volume ] I do not understand if the invalid volume error is related to opening the position or with closing the position. Before opening positions, I do the following checks to avoid using an

Draw trendline on RSI

i, I am trying to make an indicator that draws a horizontal line from current RSI value and plotting X bars back. I have made an indicator that does it on price, but I am not sure how to do the same thing on the RSI indicator. Can anyone guide me in the right direction? attached is a screenshot of

How to read txt or csv files

I am trying to read a txt file and am not sure what the best way to do this in mql4 is. (I am not very familiar with mql4) In mql5 I use the following method to read the txt file and use that data as a string variable called NewsFile within my program: #resource "HighImpactNews.txt" as string

Invalid volume

I get this error: 2019.06.28 04:54:04 failed instant sell 0.41 XAUUSD at 1423.09 [ Invalid volume ] However, I do run checks to look at size and lotstep before sending order. Can anyone see what I do wrong? void executeSell() { // check if enough free margin double margin; if ( OrderCalcMargin

Delete pending orders on deInit

Hi, I am having troubles deleting pending orders when I release the EA from chart. OnDeInit() I use the following code void OnDeinit ( const int reason) { //--- // delete pending orders for ( int i= 0 ; i< OrdersTotal (); i++) if ( OrderGetTicket (i)) if ( OrderGetString (

Error handling - freeze level

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

mt5 strategy tester - connection closed

Hi, today when I opened mt5 strategy tester I am getting an error, while it was working fine when I turned off my pc last night. When trying to backtest I get the message "connection closed" on core 1. I have tried to install a new mt5 terminal but I get the same error message. Does anyone know what

Optimizing on minor fx pairs using custom symbols

When optimizing (on every tick) with mt5 stretagy tester on minor FX pairs I notice that the tester downloads tick data from major forex pairs before running the optimisation. For example if I optimize on AUDCAD(custom symbol) the tester donwloads tick data form USDCAD and AUDUSD before running the

Strategy tester visual mode MT5

Hi, when using the mt5 strategy tester in visual mode, sometimes the trades are displayed on the chart, so that it is easy to see entry and exit points. However, sometimes these lines and plots aree immidiately deleted from the chart. They print shortly, only to be deleted again. Does anyone know