Forum

Virtual Windows 10 on iPads or on Android devices

Anyone having any experience in using Metatrader on Windows 10 installed on an iOs or an Android tablet via VMware workstation virtual machine

Highs and lows of the past bars

In OnInit(), I need to learn which side (low or high) of a past bar generated firstly? If I'm correct, there are no tick data for the past bars, so how can I do that? Thanks

Zero divide error in strategy tester

accountBalanceinEuro = ( int )( NormalizeDouble (AccountBalance(), 2 ) / NormalizeDouble (MarketInfo( "EURTRY" , MODE_ASK), 5 )); I get "zero divide" error for this line. EA is working on EURUSD. How can I make the EA to read the EURTRY prices when working in strategy tester

Wrong computation

int maximumLossPerTrade; int accountBalanceinEuro; double maximumLossPercentage; maximumLossPerTrade = ( int )(accountBalanceinEuro / 100 * NormalizeDouble (maximumLossPercentage, 1 )); When; accountBalanceinEuro = 14232 maximumLossPercentage = 1.8 I get 255 for maximumLossPerTrade. But, in excel

Reloading an EA at a given time in strategy tester

I devised an EA which I'm planning to run on my computer from 8:00 to 20:00 every trade day. I will shut down my computer every night and reload the EA every next morning. How can I simulate this case in strategy tester ? Is there a function that reloads the EA (from the first line, including all

Getting the pre-modified value after closing Metatrader

Let's say that we modified the stop loss of an order with OrderModify() and then we closed our computer. How can we get the original first stop loss of the order after opening the computer next day? Is it possible in MQL 4? Thanks

Printing double values with thousand separators on chart

I want to print the values of account balance, equity etc. on my chart. How can I print them with thousand separators, for example like 12,920.12 or like 12 920.12 (Metatrader uses this format on its terminal tab) on my chart with the Comment() function or with any other function you will advise

Rewind in strategy tester

Is it possible? If possible, what is the shortcut key (It is not "Shift + F12" as said in some topics)? Thanks

Saving a parameter of a function in a .txt file in rows

void Log_On_Chart( string labelText, color labelColor) { int file_handle = FileOpen ( "abc.txt" , FILE_READ | FILE_WRITE | FILE_TXT ); if (file_handle != INVALID_HANDLE ) { FileWrite (file_handle, labelText + "\n" ); FileClose (file_handle); } else PrintFormat (

Time in strategy tester and toggling trading status from an EA

I have two questions: 1. Is it possible to programmatically control allowing trades? 2. In strategy tester , is it possible to select exact starting time of testing? Thanks