Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 752

 
ikatsko:

Inthe strategy tester the commandMarketInfo(Symbol(),MODE_TICKVALUE) = 0(!) This happens in situations when, for example, the instrument is EURUSD and the balance currency is RUR .... and in other combinations. My understanding is thatthe balance currency must be the same as the name of the second currency in the currency pair. Otherwise, it returns zero value (in the strategy tester), which makes it impossible to perform tests with the desired combinations. How to solve this problem?

The highlighting is not correct! I am calculating in euros with EURUSD, GBPUSD etc. Only when enabled, it may give 0 until the first data is received, that's why I put a condition before calculations withTICKVALUE that if != 0;

In the tester,MarketInfo() may not work, so knowing the approximate price of a tick, I set it with the condition IsTesting() || IsOptimization() || IsVisualMode().

"Knowing theapproximate price of a tick " ? My solution is the following: approximate price of a tick = 10*CURRENCY (USDCurrencyBalance). It is set in all parameters. Of course, it would be good if the exchange rate of currency pair (USDBalance currency) could be taken automatically in the terminal. Namely, knowing the currency of the balance (AccountInfoString(ACCOUNT_CURRENCY)), for example, RUR, form a character name string, for example, USDRUR. See if there is such a symbol in the terminal? Maybe there is such symbol, for example USDRUR_c ? Get a currency pair which is available in the terminal.

 
artmedia70:
What's Vista got to do with it? The mouse, the mouse is already dying. It's going stale soon ;)
I have a laptop without a mouse, not like before with a big computer the mouse made my index finger hurt!
 
ikatsko:

Inthe strategy tester the commandMarketInfo(Symbol(),MODE_TICKVALUE) = 0(!) This happens in situations when, for example, the instrument is EURUSD and the balance currency is RUR .... and in other combinations. My understanding is thatthe balance currency must be the same as the name of the second currency in the currency pair. Otherwise, it returns zero value (in the strategy tester), which makes it impossible to perform tests with the desired combinations. How to solve this problem?

The highlighting is not correct! I am calculating in euros with EURUSD, GBPUSD etc. Only when turned on it may give 0 before the first data, that's why I put a condition before calculations withTICKVALUE that if != 0;

In the tester,MarketInfo() may not work, so knowing the approximate price of a tick, I set it with the condition IsTesting() || IsOptimization() || IsVisualMode().

"Knowing theapproximate price of a tick " ? My solution is the following: approximate price of a tick = 10*CURRENCY (USDCurrencyBalance). It is set in all parameters. Of course, it would be good if the exchange rate of currency pair (USDBalance currency) could be taken automatically in the terminal. Namely, knowing the currency of the balance (AccountInfoString(ACCOUNT_CURRENCY)), for example, RUR, form a character name string, for example, USDRUR. See if there is such a symbol in the terminal? Maybe there is such symbol, for example USDRUR_c ? Get a currency pair which is available in the terminal.

I do not need it because the price of tick does not change during testing, as well as spread and many other things. That's why I always haveMarketInfo(Symbol(),MODE_TICKVALUE) on the chart of any symbol, attached by any chart indicator I use, and put its value in the EA's code before testing.
 
borilunad:
I have a laptop without a mouse, not like I used to have a big computer and the mouse made my index finger hurt!

So the touchpad is glitchy. It has buttons on it too.

Or maybe my fingers have changed ... :) But I don't think that the "buzzing" is the cause of the OS

 
artmedia70:

So the touchpad is glitchy. It has buttons on it too.

Or your fingers are not right anymore... :) But I don't think that the "rattle" is the cause of the OS

I'm not good with terms, touchpad, rattle... Although touchpad is when the car falls down?! But I'm not afraid of it, I do not have a car and do not need it. I enjoy walking in a beautiful city, and when I have to, very convenient public transportation with good roads and no traffic jams! :)
 
borilunad:
I'm not very good with terms, touchpad,"rattle" ... Although a touchpad is when a car falls down?! But I'm not afraid of it, I don't have a car and don't need one. I enjoy walking in a beautiful city, and when I have to, very convenient public transportation with good roads and no traffic jams! :)

Did you get banned from Google?

Touchpad(touchpad),touch panel is a pointinginput device; the invention relates to automation and computer engineering and can be used to read and input information into a computer, such as symbols, as well as information about the coordinates of the position of elements and parts made of magnetic material on the surface of the touch panel. The touch panel contains a package of printed circuit boards. On the layers of each printed circuit board are flat spiral inductive-capacitive elements connected in series chains along the rows and columns of the matrix. The matrices of all PCBs are aligned with each other. An insulating layer is placed between adjacent PCB surfaces. The outputs of the rows (columns) of the i-printing board are connected to the inputs of the rows (columns) of the (i+1)-printing board, and the inputs of the rows and columns of the matrix of the first printed circuit board in the package are the inputs of the touch panel, whose outputs are the outputs of the rows and columns of the matrix of the last printed circuit board in the package. Like other pointing devices, a touchpad is typically used to control a "pointer"by moving a finger across the surface of the device. Touchpads come in a variety of sizes, but are typically less than 50cm² in size. The shape is most often rectangular, but there are also circular models.

 

Can you guys tell me what might be causing the glitch that occurred today?

The EA has an option to stop trading 15 minutes before market close on Friday.

When a new day appears the EA checks if it is Friday, then today we stop trading in StringToTime("23:59")-15*60

datetime FinishInFriday;
void OnTick()   {
   datetime cur=TimeCurrent();
   if(PrevDay!=Day()) {                               // при наступлении нового дня
      PrevDay =Day();
      
       if(TimeDayOfWeek(cur)==5) {                    // если сегодня пятница
         FinishInFriday=StringToTime("23:59")-15*60;    // время окончания торговли
         Print("Finish In Friday = ",FinishInFriday);   
       }
   }
   if(TimeDayOfWeek(cur)==5)
      if(cur>FinishInFriday) 
         return;
}

In the strategy tester, this function works correctly. However, in real trading, I see a totally different situation - the Expert Advisor stops trading on the first tick when Friday arrives.

Here are the prints from Expert Advisor's journal:

Broker #1, demo:

0 05:59:47.731 Scalper GBPAUDpt,M1: Finish In Friday = 2014.10.23 23:44:00

Broker 2, real:

0 03:00:11.999 Scalper EURUSD,M1: Finish In Friday = 2014.10.23 23:44:00

That is, when today's daily bar appears (Friday, 24th October) on the first tick, the EA

will convert the line "23:59" to yesterday's time instead of assigning today's day.

But if the EA is restarted on Friday in the middle of the day, it will correctly determine the time of completion.

 
tuner:

Can you guys tell me what might be causing the glitch that occurred today?

The EA has an option to stop trading 15 minutes before market close on Friday.

When a new day appears the EA checks if it is Friday, then today we stop trading in StringToTime("23:59")-15*60

In the strategy tester, this function works correctly. However, in real trading, I see a totally different situation - the Expert Advisor stops trading on the first tick when Friday arrives.

Here are the prints from Expert Advisor's journal:

Broker #1, demo:

0 05:59:47.731 Scalper GBPAUDpt,M1: Finish In Friday = 2014.10.23 23:44:00

Broker 2, real:

0 03:00:11.999 Scalper EURUSD,M1: Finish In Friday = 2014.10.23 23:44:00

That is, when today's daily bar appears (Friday, 24th October) on the first tick, the EA

will convert the line "23:59" to yesterday's time, instead of assigning today's day.

But if the EA is restarted on Friday mid-day, it will correctly determine the time of completion.

Take a closer look.

If yesterday's day is not equal to today's day...

You will only enter this unit once a day.

Somehow I doubt it will work correctly in the tester either.

Look at MqlDateTime and TimeToStruct in documentation.

It's a simple structure, and it's much more convenient to work with than with such date and time conversions.

 
Vinin:

Did you get banned from Google?

Touchpad(touchpad),touch panel is a pointinginput device; the invention relates to automation and computer engineering and can be used to read and input information, such as symbols, as well as information about the coordinates of the position of elements and parts made of magnetic material, on the surface of the touch panel. The touch panel contains a package of printed circuit boards. On the layers of each printed circuit board are flat spiral inductive-capacitive elements connected in series chains along the rows and columns of the matrix. The matrices of all PCBs are aligned with each other. An insulating layer is placed between adjacent PCB surfaces. The outputs of the rows (columns) of the i-printing board are connected to the inputs of the rows (columns) of the (i+1)-printing board, and the inputs of the rows and columns of the matrix of the first printed circuit board in the package are the inputs of the touch panel, whose outputs are the outputs of the rows and columns of the matrix of the last printed circuit board in the package. Like other pointing devices, a touchpad is typically used to control a "pointer"by moving a finger across the surface of the device. Touchpads come in a variety of sizes, but are typically less than 50cm² in size. The shape is most often rectangular, but there are also circular models.

Like me on Vista, and rectangular on my new 8-ka, which disappointed me with its antics, it's impossible to work quietly, suddenly everything goes somewhere, it must be a fashion from mobile phones, they think that the whole world lives only for entertainment! Thanks for the informative message (can't you make a joke?)!
 
AlexeyVik:

You only enter this unit once a day.

Somehow I doubt that this will work correctly in the tester as well.

This is exactly the idea, to speed up the code to perform some functions once a day. For example, in this block we can check if it is winter or Friday, or if it is the day of shift. I think there's no sense to perform these checks every tick, it's enough to check every day on the first tick of a new daily bar. The code in the tester works correctly, and I don't see any reason why it might not work. Thanks for the advice, I'll see what's up with the structures...
Reason: