Questions from Beginners MQL5 MT5 MetaTrader 5 - page 558

 
K.t.s:

Hello, everyone,

How do I get the digits that make up a number? (number 36, digits 3 and 6)

You must first convert the number to a string and then go through the string one by one and extract the characters:

//+------------------------------------------------------------------+
//|                                                         Test.mq5 |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property script_show_inputs
input int number=36;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+ 
void OnStart()
  {
   string   text=IntegerToString(number);
   int      len=StringLen(text);
   for(int i=0;i<len;i++)
     {
      string Substr=StringSubstr(text,i,1);
      Print(Substr);
     }
  }
//+------------------------------------------------------------------+
Files:
Test.mq5  2 kb
 
q15:

Greetings to all present,

Newbie question - I want to order a program - robot for trading on cryptocurrency exchange. So far I'm focusing on Fibonacci levels (or candlestick analysis), but I haven't chosen the final strategy. The program should place two or three buy or sell orders for two or three currencies depending on previous day's close and price behavior this day. After the execution of a buy order it places a sell order and vice versa, etc. All actions are explained in the program, optimal variants are suggested, the program is running on the computer 24 hours a day, taking into account possible connection failures. So far in this approximation.

What is of interest - the possible price and timing. Maybe your expert advice.

Best regards

The work is done in the Freelance section. Reference article on how to make orders in freelancing:"How to order a sales robot and get results".
 
K.t.s:

Hello, everyone,

How do I get the digits that make up a number? (number 36, digits 3 and 6)

I've written a script. Can you figure it out?

//+------------------------------------------------------------------+
//|                                    Разложение числа на цифры.mq4 |
//|              Copyright 2016, Artem A. Trishkin, Skype artmedia70 |
//|                       https://login.mql5.com/ru/users/artmedia70 |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, Artem A. Trishkin, Skype artmedia70"
#property link      "https://login.mql5.com/ru/users/artmedia70"
#property version   "1.00"
#property strict
#property script_show_inputs
//--- input parameters
input int      Input1=36;  // Число
int arrayNumbers[];
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   ArrayResize(arrayNumbers,StringLen(IntegerToString(Input1)));
   DecompositionNumber(Input1,arrayNumbers);
   for(int i=0; i<ArraySize(arrayNumbers); i++) {
      Print("Индекс массива ",i,": цифра ",arrayNumbers[i]);
      }
  }
//+------------------------------------------------------------------+
// раскладывает число на цифры и записывает их в массив.
void DecompositionNumber(int number, int &array[]) {
   ArrayInitialize(array,0);
   int n=1;
   for(int i=0; i<ArraySize(array); i++) {
      n=(i>0)?n*10:n;
      array[i]=(number/n)%10;
      }
}
//+------------------------------------------------------------------+
 
Karputov Vladimir:
What build? Insert a picture, please, the optimization settings.

To answer your question, started repeating yesterday's situation with two metatester processes, but everything normalised on its own... i.e. I may have run two testers)

And now, after rebooting, the tester runs normally and loads the computer within reason. Build 1297 with hedging.

THANKS FOR THE FEEDBACK !

!!! However, this randomness has become a pattern...

There are already three metatasters in memory and two of them load the memory up to 100%, the third apparently not enough space)

I hope to get here a picture in the zipfile, if shto add, then let me know ?

Three metatester.exe

Files:
ctbd3vtzdk2.zip  65 kb
 
akarustam:

To answer your question, started repeating yesterday's situation with two metatester processes, but everything normalised on its own... i.e. I may have run two testers)

And now, after rebooting, the tester runs normally and loads the computer within reason. Build 1297 with hedging.

THANKS FOR THE FEEDBACK !

!!! However, this randomness has become a pattern...

There are already three metatasters in memory and two of them are loading memory up to 100%, the third apparently not enough space)

Hopefully the zipfile picture will get here, if shto add, will let me know ?

Unfortunately I can not check on such an ancient operating system, as you have (my system settings are the first three lines of the tab "Log" after a restart of the terminal ":

2016.04.10 06:57:30.121 Terminal        MetaTrader 5 x64 build 1297 started (MetaQuotes Software Corp.)
2016.04.10 06:57:30.121 Terminal        Windows 10 Pro (x64 based PC), IE 12.62, UAC, Intel Core i3-3120 M  @ 2.50 GHz, RAM: 1306 / 3981 Mb, HDD: 38854 / 233310 Mb, GMT+02:00
2016.04.10 06:57:30.121 Terminal        C:\Users\KVN\AppData\Roaming\MetaQuotes\Terminal\0 CFEFA8410765D70FC53545BFEFB44F4

), but I think kernel loading is fine, only in my operating system I don't see metatester.exe, but test agents:

1

and here's the loading by cores (I have four cores):

2

 
Karputov Vladimir:

Unfortunately I can't check on an ancient operating system like yours (my system settings are the first three lines from the "Log" tab after restarting the terminal":

), but I think kernel loading is normal, only in my operating system I don't see metatester.exe, but test agents:

and here's the loading by cores (I have four cores):

THANK YOU, while I'm exploring, lots of new stuff. Planned and already brought a ten with all applications, I will study and want to understand the reasons of negativity in relation to ten (met such on forums). However, this is Our near future and there are obvious modern answers to the challenges of Our time. THANK YOU (THANK YOU)).
 
A1981:
Hello, I have written a script to set stops on an open order. I have written a script that sets stops on the open order and pending orders are placed based on the open order. Everything works, but on the next pair on the open order stops are placed, but pending orders do not open.
 

Karputov Vladimir:

A1981:
Good afternoon. I have written a script to set stops on the open order and pending orders are placed based on the open order. Everything works, but for the next pair on the open order stops are placed, but pending orders do not open.
You should go here.
 
Artyom Trishkin:
You should go here.
Artyom Trishkin:

Artyom Trishkin:
You need to come here.

Artyom Trishkin:
You need to go here. I figured it out on my own. Thanks for not being pushy.
 

Here are the wonders of testing an EA program in MT5 (see picture-file)...Can there be positive eqivity with a negative balance ? and when is the balance negative ? Before turning to Trading Nation changed my mind a lot and never got around to it yet... I think it's time to get some sleep)

If anyone interested in the open code and set let me know ? - I will certainly post it. I have started to master MT5 with hedging and now, - miracles, though)