Forum

Symbol Scanner - Indicator values

It's been a while, but I'm back trading again. There is something that I need to get done before I can start. I need to calculate indicator values for every symbol that is loaded. My code currently looks as follows to calculate the ATR< however the ATR CopyBuffer returns -1. Any idea what I'm doing

Clean up array, remove all data from array

Hello, How can I clean up an array? For example I used an array, the array is now full of data, now I need to remove all data so that I can use it again. Any idea how I can do this? Replacing all data with 0 in a loop (the array is double) won't work it will interfere with calculations. I need to

OrderLot() Problem

Hey all, My demo account in the strategy tester uses lots of two decimals, 0.21, 0.55 etc etc. When I call OrderLots() I get a one decimal value, 0.5, 0.6 etc. What is even more problematic is the OrderProfit() and OrderSwap() is calculated from the OrderLot() with one decimal thus if I manually add

Historical Data - Problems

Hey all, I know this topic has been brought up and discussed many times, but I'm opening a new thread again just to highlight the importance of this. As you all might know in MT5 you cannot use your own historical data, you can only use those provided by the server you are receiving data from. Now I

Access Tester Statistics from Code

Hey, Is it possible to access tester statistics when the deint() function is called? I tried to calculate the statistics myself by accessing the historical orders, but my values differ from that of the strategy tester . If not possible is there code available that shows exactly how the tester

Create csv file, and write array to files

Hey, I have four one dimensional arrays, would like to write them to a csv file, one column per array. I'm not sure how to do this, I cannot find a function to create a new file with. Any idea how to do this

OnTester Capabilities

Hey everyone, I was wondering if the following is possible: I would like to retrieve all trade data at the end of the test in my EA code, do some statistical calculations with the trade data, and export to a text or excel file. For instance I would like to retrieve each executed trade 's

Time and Timezones problem

Hey, My strategy works that there is a certain hour every day when the propability is the highest for a trade to be succesful. The only problem that I'm having is pulling the hour from the time mql gives may not correct itself for daylight savings and time zones ? For instance if I specify the hour

Pending Order Expire

Hey, I'm trying to figure out how to set an expire time for a pending order . So far that part of my code looks like this: CTrade trade; trade.SetExpertMagicNumber(MagicNr); trade.SetDeviationInPoints(Slippage*z); if ( PositionsTotal () || OrdersTotal () != 0 ) { return ;} if

Multi Currency Experts Back Testing Problem

Hello everyone, I know this topic has been discussed but of late I could not find any updates on the issue. The problem is back testing multi currency experts gives different results when tested on different currencies. The difference is MAJOR, otherwise this would not have been a problem. I