Machine learning in trading: theory, models, practice and algo-trading - page 2288

 
Igor Makanu:

Why? You now have "in 2 clicks" OHLC and spread on this data on my custom chart, subtract the spread when opening/closing orders

Where should I deduct it from if the TP triggers? From the balance and equity lines drawn by the tester? And from their final values? I need to look up how to do it...
 
Renat Fatkhullin:

You talk about programming languages and their future, but you have no idea that the TIOBE Index is the most authoritative index of the popularity of programming languages.

To you, it's noname.

Went again to this TIOBE Index
Found one mention:

The Next 50 Programming Languages

The following list of languages denotes #51 to #100. Since the differences are relatively small, the programming languages are only listed (in alphabetical order).

  • 4th Dimension/4D, ABC, ActionScript, Alice, Applescript, AutoLISP, B4X, bc, Bourne shell, CIL, CL (OS/400), Clojure, CoffeeScript, Common Lisp, Crystal, cT, Elixir, Emacs Lisp, Erlang, F#, Factor, Hack, Icon, Inform, Io, J, Korn shell, Ladder Logic, LiveCode, Maple, ML, MQL4, NATURAL, Nim, OpenCL, OpenEdge ABL, PILOT, PL/I, PostScript, Q, Ring, RPG, S, Simulink, Small Basic, SPARK, SPSS, Stata, Tcl, Verilog

 
elibrarius:

For all High and Low I need to keep the order they come in by time, i.e. they may not be in the order I wrote them.

That's exactly what my script does.

for(int i = ArraySize(ticks) - 1; i >= 0; i--)
   {
      ticks[i].bid = ticks[i].ask;
   }

Are you testing in Python or in R? - unload the OHLC of the original character, then drop the script on the chart .... oops, wrote on the fly, you need to put the time D'2021.01.01' in the settings

and upload this custom chart to yourself - these OHLCs are completely synchronous

 

In general, my idea is raw, and there may be pitfalls - like the price went down a little bit did not reach Low, then went up to High, then only to Low.
Without all the ticks, it is impossible to assess what will be the first TP or SL.

Although, in my MO models, I think that if both TP and SL have triggered on the bar, the first triggered is the disadvantageous variant, i.e., SL.


But it is possible to think about it, if someone besides me such real OHLC would be useful...

 
Igor Makanu:

This is exactly what my script does.

Are you testing in Python or in R? - unload the OHLC of the original character, then drop the script on the chart .... oops, wrote on the fly, you need to put the time D'2021.01.01' in the settings

and upload this custom chart to yourself - these OHLC are completely synchronous

I upload them to files, and then I can transfer them to R, python, DLL or a remote server.
 
elibrarius:

In general, my idea is raw, and there may be pitfalls - like the price went down a little bit did not reach Low, then went up to High, then only to Low.
Without all the ticks, it is impossible to assess what will be the first TP or SL.

Although, in my MO models, I think that if both TP and SL have triggered on the bar, the first triggered is the disadvantageous variant, i.e., SL.


But you can think about it, if someone else besides me would benefit from such real OHLC...

of course without tick arrival time you will not be able to estimate what was earlier High or low only by OHLC

this is the same task I did for myselfhttps://www.mql5.com/ru/forum/282062/page34#comment_20079886

#define  OPEN   0
#define  HIGH   1
#define  LOW    2
#define  CLOSE  3

MqlTick HistoryData[];
MqlTick bar[4];
const datetime t_bar[] = {0, 20, 40, 59};
//+------------------------------------------------------------------+
int OnInit()
{
   ArrayResize(HistoryData, 1, 2000000);
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   int handle = FileOpen(_Symbol + "_tick.bin", FILE_WRITE | FILE_BIN | FILE_COMMON);
   if(handle < 0)
   {
      Print("Erorr write array # ", GetLastError());
      return;
   }
   FileWriteArray(handle, HistoryData, 1);
}
//+------------------------------------------------------------------+
void OnTick()
{
   MqlTick tick;
   if(!SymbolInfoTick(_Symbol, tick)) return;
   static datetime LastBarM1 = 0;
   datetime d_minutes = tick.time / 60;
   if(LastBarM1 == 0)   // первый запускt
   {
      for(int i = 0; i < 4; i++) bar[i] = tick; // проинициализируем
      LastBarM1 = d_minutes;
   }

   if(d_minutes != LastBarM1) //--- если новая минута
   {
      if(bar[HIGH].time_msc > bar[LOW].time_msc)   // поменяем местами по времени тика
      {
         MqlTick tmp = bar[LOW];
         bar[LOW] = bar[HIGH];
         bar[HIGH] = tmp;
      }
      datetime t = LastBarM1 * 60;  // посчитаем вренмя, sec = 0
      for(int i = 0; i < 4; i++)    // подменим время тика
      {
         bar[i].time = t + t_bar[i];
         bar[i].time_msc = bar[i].time * 1000;
      }
      ArrayInsert(HistoryData, bar, ArraySize(HistoryData));   // добавим в массив
      for(int i = 0; i < 4; i++) bar[i] = tick;                // проинициализируем
      LastBarM1 = d_minutes;                                   // запомним минуты
   }

   if(tick.ask > bar[HIGH].ask) bar[HIGH] = tick;
   if(tick.ask < bar[LOW].ask)  bar[LOW]  = tick;
   bar[CLOSE] = tick;
}
//+------------------------------------------------------------------+

this script will unload the high/low in the right sequence depending on what was earlier

 
Igor Makanu:

of course without tick arrival time you can't estimate what was earlier High or low only by OHLC

this is the same task I did for myselfhttps://www.mql5.com/ru/forum/282062/page34#comment_20079886

this script will unload the high/low in the right sequence depending on what was earlier

Thanks, I'll do something like that soon.
 
elibrarius:

In general we need a second version of real ticks, but in which there are only 6 ticks:
Open: Bid and Ask

High Bid

High Ask

Low Bid

Low Ask

Close: Bid and Ask

For all High and Low it is necessary to keep the order of their arrival by time, i.e. they can be not in that order, as I have written them.

Using this tool, you can estimate Bars with the accuracy of real ticks. With much less traffic. Of course, the tester should be taught to trade with them. But I think that the engine of real ticks will do without any modifications.

fxsaber did it for MT4 some time ago.

Now it's no problem at all - from real ticks it is possible to assemble any thinned version to castrum tool and test it.

 
Renat Fatkhullin:

We will develop direct integration with WinML, as we did for OpenCL and DirectX.

In addition, we have a big project to include C++ modules/packages similar to other languages. That is, it will be possible to convert a lot of open source libraries into packages.

Matrix operations at least on CPU/Multithreads/AVX, but possibly with GPU as well.

Highlighted sounds inspiring. Especially if there are similar Keras or at least Tenzor Flow libraries in C++. Thanks.

s.s. WinML is only about online work, no training, right? But it's good, models are getting heavier and heavier.

 
Maxim Dmitrievsky:

Where is the real chart and where is the generated one?


Above is the generated chart, below is the market chart