Forum

Import ticks to custom symbol programmatically

I created a custom symbol based on a "regular" symbol for testing reasons. Up to now I'm importing ticks periodically manual from the regular to the custom symbol. My goal is to import ticks programmatically in the onInit function of the expert advisor. I had a look at several sources but couldn't

Find out Tester Pass Number in OnInit() or OnTick() Event?

Is there any chance to find out the tester pass number in OnInit() or OnTick() Event? I mean this number: Goal: Find out the optimized parameters and their values for each tester pass in the OnInit() or OnTick() event. ParameterGetRange is not possible because it only works in the OnTester

OnTester, OnTesterPass, OnTesterDeinit events seem not firing

Hello, I'm trying to use the OnTester events, but it seems to me that they don't fire. Code for testing: double OnTester (){ Print ("Hello OnTester "); return ( 0 ); } void OnTesterPass (){ Print ("Hello OnTesterPass "); } void OnTesterDeinit (){ Print ("Hello OnTesterDeinit "); } After finishing

Change name, text and subscription fee of a signal

Hello, I want to change the name of my signal, also do some corrections in the text and change the subscription fee. Unfortunately I can't find a way to do that. Best regards Jorg

Create Record in Sqlite DB during Optimization outside OnTesterDeinit() event - possible?

Hello, I'm using an Sqlite database to do some documentations. It works perfect when making a single test. But during optimization the database access (= create some records) only works in the "OnTesterDeinit()" event. I tried to access a Sqlite Database during optimization in the OnTick event. But

OnTradeTransaction Event is triggered 4 times when closing one position

Hi there, this code is triggered 4 times when I'm closing one position. It's important for me to do ( // do something ) in the following code only one time. But how? void OnTradeTransaction ( const MqlTradeTransaction & trans, const MqlTradeRequest & request

Templates "tester" and "default" are not applied automatically

Hi there, since a few days I recognize that if I run a backtest there are more objects (= trades) in the backtesting chart than the EA generated. It seems that thee EA uses a different template than the "tester" template. If I apply the "tester" template manually to a chart window, then all objects

Calculated Moving average mode SMMA different in strategy tester visualization compared to normal chart

Dear all, I found out that the calculated moving average (mode SMMA) is different vom the same moving average in the normal chart window. The consequence is a wrong behavour of the EA. Let's take this small "EA" to show the problem: void OnTick () { // Create an array double

Strategy optimization with real ticks allowed in cloud network now?

Hi there, I'm wondering if testing with real ticks is allowed with the cloud network. Why I'm asking: I can configure this: There are no errors occuring and everything seems to be correct. Yes, I read all the articles about strategy optimization (local agents / cloud etc.) But it seems to be

Warning: Possible loss of data due to type conversion - in conjunction with array

Hi there, I'm migrating an expert advisor from MQL4 to MQL5. int TTTradeState[ 99 ]; uint PosTotal; ulong PosMagic; PosTotal= PositionsTotal (); for ( uint all_positions = 0 ; all_positions < PosTotal; all_positions++ ) { PosMagic = PositionGetInteger ( POSITION_MAGIC );