Algorithms, solution methods, comparison of their performance - page 19 1...121314151617181920212223 New comment Реter Konow 2017.12.11 11:01 #181 Alexandr Andreev: I know it wasn't about a ticket. No. It was about the transaction number. Alexandr Andreev 2017.12.11 11:03 #182 Реter Konow: No. It was about the sequence number of the transaction.in your code the zero zero index is empty - not good Реter Konow 2017.12.11 11:03 #183 Alexandr Andreev: But I still advise you to start complicating the code with all sorts of things like template functionsIn this task, I don't see the need for this. It would inevitably reduce the effectiveness of the particular solution.In other tasks it may be necessary.I won't deny it. Sergey Dzyublik 2017.12.11 11:04 #184 Реter Konow:You can make a parallel array next to each other to record tickets. Or several parallel arrays to write the rest of data of each order."Because you can't be that beautiful in the world..." Forum on trading, automated trading systems and trading strategy testing Algorithms, solution methods, comparing their performance Retag Konow, 2017.12.11 10:50 Alexandr Andreev:Now let's usetemplate<typename T>Why?Genius. typename in class templates Algorithm Optimisation Championship. My approach. The core Реter Konow 2017.12.11 11:06 #185 Alexandr Andreev: in your code a null null index is empty - not goodWhy zero? for(int a1 = 0; a1 < Random_orders_of_strategy; a1++) { int this_magic = MathRand(); //---------------------------- order_number++; //--------------------------------- //Записываем магик в массив после прибавлениея ячейки. //--------------------------------- ArrayResize(All_magics,order_number); All_magics[order_number - 1] = this_magic;// <- Вот здесь. //--------------------------------- } Alexandr Andreev 2017.12.11 11:08 #186 Реter Konow: Why zero? It's your own code.int All_magics[]; int Random_orders_of_strategy; //+------------------------------------------------------------------+ template<typename T> void ArrayAdd(T &m[], T& a) {m[ArrayResize(m,ArraySize(m)+1,100)-1)=a;} void Trading() { Random_orders_of_strategy = MathRand(); //---------------------------------------- //Имитируем открытие неопределенного количества ордеров стратегии. //---------------------------------------- for(int a1 = 0; a1 < Random_orders_of_strategy; a1++) { int this_magic = MathRand(); ArrayAdd(All_magics,this_magic); } //---------------------------------------- } //+------------------------------------------------------------------+ int Get_magic(int deal_number) { return(All_magics[deal_number]); // ут была ошибка тоже } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { Trading(); ulong t1 = GetMicrosecondCount(); Get_magic(1000); ulong t2 = GetMicrosecondCount(); Реter Konow 2017.12.11 11:10 #187 Alexandr Andreev: It's your own code.No. That's not my code. Someone has rewritten it.I never used the entry.template<typename T> void ArrayAdd(T &m[], T& a) {m[ArrayResize(m,ArraySize(m)+1,100)-1)=a;} Alexandr Andreev 2017.12.11 11:11 #188 Реter Konow: No. That's not my code. Someone has rewritten it.I never used the entry This is an example and what came out of it.Has the code become more complex or simpler?ZS: yes null you write it normally, I missed the rubbish) Реter Konow 2017.12.11 11:14 #189 Alexandr Andreev: This is an example and what happened with its implementation Has the code become more complicated or simpler?I don't know why you would add entities to an ideal solution. I don't see the point.You don't wear two hats at the same time. And why?Explain it first. )) Alexandr Andreev 2017.12.11 11:21 #190 Реter Konow: I don't know why you would add entities to an ideal solution. I don't see the point.You don't wear two hats at the same time. And why is that?Explain that first. ))It's not about putting on a hat.... you're just sewing that hat every time, and it's not very good quality. 1...121314151617181920212223 New comment
I know it wasn't about a ticket.
No. It was about the sequence number of the transaction.
in your code the zero zero index is empty - not good
But I still advise you to start complicating the code with all sorts of things like template functionsIn this task, I don't see the need for this. It would inevitably reduce the effectiveness of the particular solution.
In other tasks it may be necessary.
I won't deny it.
You can make a parallel array next to each other to record tickets.
Or several parallel arrays to write the rest of data of each order.
"Because you can't be that beautiful in the world..."
Forum on trading, automated trading systems and trading strategy testing
Algorithms, solution methods, comparing their performance
Retag Konow, 2017.12.11 10:50
Now let's use
template<typename T>
Genius.
in your code a null null index is empty - not good
Why zero?
Why zero?
It's your own code.
No. That's not my code. Someone has rewritten it.
I never used the entry.
No. That's not my code. Someone has rewritten it.
I never used the entry
This is an example and what came out of it.
Has the code become more complex or simpler?
ZS: yes null you write it normally, I missed the rubbish)
This is an example and what happened with its implementation
Has the code become more complicated or simpler?I don't know why you would add entities to an ideal solution. I don't see the point.
You don't wear two hats at the same time. And why?
Explain it first. ))
I don't know why you would add entities to an ideal solution. I don't see the point.
You don't wear two hats at the same time. And why is that?
Explain that first. ))
It's not about putting on a hat.... you're just sewing that hat every time, and it's not very good quality.