Errors, bugs, questions - page 3123

 
x572intraday #:

Speaking of looking for free code.

Try to guess what percentage of programmers search for programs to help their profitable trading or to learn the code. Personally, I think the correlation will be in favor of the former, since far fewer seekers see themselves as programmers in this field.

1. I am sure that if someone is looking for something in kodobase, it is purely for application in their own developments, i.e. they look for code for code's sake. and the quality and readability of code is of great importance in this case. Personally, when faced with a new more or less complicated task I have not yet solved myself, I go to codebase and if there is no sensible solution, I do it myself. That's more effective, but with the subtlety that I will only take near-perfect code, or code which can be easily improved to near-perfect. I'll never take a noodle, even if it works somehow in the end.

2. Vitaly told you everything correctly about the disadvantages of the code, while you are making excuses in kindergarten. You wanted to be the centre of attention and show your stubbornness?)

 
Aleksey Mavrin #:

1. I am sure that if someone is looking for something in kodobase, it is purely for use in their own development, i.e. they are looking for code for code. and the quality and comprehensibility of the code is of great importance in this case. Personally, when faced with a new more or less complicated task I have not yet solved myself, I go to codebase and if there is no sensible solution, I do it myself. That's more effective, but with a subtlety that I will only take near-perfect code, or code which can be easily improved to near-perfect. I'll never take a noodle, even if it somehow works in the end.

2. Vitaly told you everything correctly about the disadvantages of the code, while you are making excuses in kindergarten. You wanted to be the centre of attention and show your stubbornness?)

1. interesting confidence. I'll try to guess its origins. You probably think that CodeBase contains only free products, that they a priori cannot be full-fledged for the profitable trading, so users understand that (not programmers, but those who decided to earn extra money trading) immediately breaks their money box and go to Market to buy paid, supposedly ready for making profit on the exchange? If this is your opinion, I do not agree with it. Suffice it to mention the main reason: among others, there are many traders who are not rich or even free, who have saved up for the first cent deposit, but not a program from the Market for at least dozens of dollars. And they also understand, that the cheaper a program fromMarket, the less useful it is, most likely, and the source code may be unavailable at all. - you'd better go to CodeBase and see if you're lucky enough to find something relatively useful... And if you really need to improve it, here's raw code - study and improve it (which not everyone will do). I think prejudice as if free software is worse than paid one is the lot of those who haven't dug deeply into CodeBase. It's like saying thatMetatrader's paid server part is cooler than free client part. Obviously the client's freeness is funded by the server's paidness - the developer is the same and can afford it. But if you look wider, the world of software in general is full of free paid analogues with very good functionality and quality. At the same time, returning to the trading software ecosystem, one has to realize that nobody will put the grail of automated trading in the free-of-charge section. It will scarcely be available in Market or something else for big money. But if not to chase after grail, but to look for good support at least for manual trading, free software is not inferior to many ambitious fee-based endeavors.

As a result, all the way through you were absolutely clear about programmers' interests with respect to CodeBase, which, I repeat, can not be as many as dreamers to find there ready and earn some money, without understanding the structure of the code. If you disagree, give us your arguments.

2. Vitaly was absolutely right to point out some shortcomings, but in the end he gives you a couple of F's as a code review. He wouldn't be allowed anywhere near computer science teachers. Unlike him, I try to be more reasonable and reasoned. You get a "F" for total ignorance of a language, or for knowing it so badly that the code is not written, or it's written, but the poor guy can't compile it (or doesn't interpret it) without errors and finally it doesn't run, or it runs but gives garbage. You can get "F" if in the basic sense the final product works as intended, but it is glitchy and unstable, noticeably slow, the functionality is very modest and there are no options when you clearly need them (although it refers not to the source code, but to the result of the work). B can be given with minor defects: insufficient speed optimized, poor readability, unformatted, undocumented code. If the code turned out to be alienly abstruse or schizophrenically absurd but the program worked perfectly and stably, I wouldn't take upon myself to give it a low grade - maybe a B at least. If everyone is taught to a standard, without individuality, it is easy to stifle talent.

Vitalik's D is a clear inflection and not my case; he is right in the inadequate conditions of my case.

 
Aleksey Mavrin #:

1. I am sure that if someone is looking for something in kodobase, it is purely for use in their own development, i.e. they are looking for code for code. and the quality and comprehensibility of the code is of great importance in this case. Personally, when faced with a new more or less complicated task I have not yet solved myself, I go to codebase and if there is no sensible solution, I do it myself. That's more effective, but with a subtlety that I will only take near-perfect code, or code which can be easily improved to near-perfect. Noodles, even if they work somehow in the end, will never be taken.

It is for programmers like us that I propose to introduce an additional vote for the source code in the form of a separate rating.This is not some fleabag one-day-standby or five stars software dump (where you vote for everything possible in respect of ready-made software, but not for the source code), but a serious site for traders and programmers, known not only in Runet, but all over the Internet and far beyond. How else to search for quality raw materials without rating, eh?

О проекте MQL5.community
О проекте MQL5.community
  • www.mql5.com
MQL5.community - это описание языка программирования MetaQuotes Language 5, статьи по самой различной тематике, форум, программы автотрейдинга, написанные на MQL5 c их использованием в торговой платформе MetaTrader 5
 
x572intraday #:

Move your complaints about your code being poorly rated to the discussion of your code.

I don't think you can do it yourself, ask your bugbear to do it. Stop discussing your creation in the general useful thread.

 
It is very unfortunate and wrong that there is no possibility of re-voting in the QB.

Firstly, I have had cases where, I accidentally clicked on the wrong star.
Secondly, the code can be refined and corrected.

 
Why aren't the now-so-available cryptocurrencies on MQ's servers at weekends? Not a problem switching to another provider 24/7, but why is MQ any worse? It wouldn't hurt...
 

Market Validator drops this

test on EURUSD,H1 (hedging) not synchronized with trade server strategy tester report 462 total trades

Build MT 5 3134

 

Please help with DRAW_FILLING build type

For some reason one pair of buffers works fine, but the second refuses to accept the colour assigned in different ways.


Even tried to leave two buffers and respectively one build and the result does not change. If by high build fill colour is normal, but by low colour is not.

Here is the code

#property indicator_chart_window
//---
#property indicator_buffers 4
#property indicator_plots   2
#property indicator_type1   DRAW_FILLING
#property indicator_label1  "Line UP"
#property indicator_color1  clrDarkOrchid
#property indicator_type2   DRAW_FILLING
#property indicator_label2  "Line DN"
#property indicator_color2  clrMagenta

/****************indicator buffers****************/
double upLine[],
       upWidth[],
       dnLine[],
       dnWidth[];
/**************Custom indicator initialization function**************/
int OnInit()
 {
  SetIndexBuffer(0, upLine);
  SetIndexBuffer(1, upWidth, INDICATOR_CALCULATIONS);
  SetIndexBuffer(2, dnLine);
  SetIndexBuffer(3, dnWidth, INDICATOR_CALCULATIONS);
  //PlotIndexSetInteger(1, PLOT_SHOW_DATA, false);
  //PlotIndexSetDouble(1, PLOT_EMPTY_VALUE, -1.0);
  //PlotIndexSetInteger(2, PLOT_SHOW_DATA, false);
  //PlotIndexSetInteger(2, PLOT_LINE_COLOR, clrYellow);
  //PlotIndexSetDouble(2, PLOT_EMPTY_VALUE, -1.0);
  return(INIT_SUCCEEDED);
 }/******************************************************************/

/****************Custom indicator iteration function*****************/
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
 {
  int count = 0, limit = prev_calculated > 0 ? rates_total-1 : 0;
  if(prev_calculated == 0)
   {
    ArraySetAsSeries(time, true);
    ArraySetAsSeries(high, true);
    ArraySetAsSeries(low, true);
    ArraySetAsSeries(upLine, true);
    ArraySetAsSeries(upWidth, true);
    ArrayInitialize(upLine, 0.0);
    ArrayInitialize(upWidth, 0.0);
    ArraySetAsSeries(dnLine, true);
    ArraySetAsSeries(dnWidth, true);
    ArrayInitialize(dnLine, 0.0);
    ArrayInitialize(dnWidth, 0.0);
    for(int i = limit; i < rates_total; i++)
     {
      int arrMax = ArrayMaximum(high, i, 11); //  ищем максимум в 11-ти барах
      if(arrMax-i == 5)                       //  если максимум средний из 11-ти баров
       {
        for(int j = arrMax; j > fmax(arrMax-5, 0); j--)
        {
         upLine[j] = high[arrMax];
         upWidth[j] = high[arrMax]-_Point*2;
        }
       }
      int arrMin = ArrayMinimum(low, i, 11); //  ищем минимум в 11-ти барах
      if(arrMin-i == 5)                      //  если минимум средний из 11-ти баров
       {
        for(int j = arrMin; j > fmax(arrMin-5, 0); j--)
        {
         dnLine[j] = low[arrMin];
         dnWidth[j] = low[arrMin]+_Point*10;
  //PlotIndexSetInteger(3, PLOT_LINE_COLOR, clrYellow); // Это тоже не помогает…
        }
       }
     }
   }
//---
  Comment("\n"
         );
  return(rates_total);
 }/*******************************************************************/

Maybe in some .ini file is stuck what setting? Maybe delete it, but I don't know where to look for this file... I don't know what to think.

 
Folks, good afternoon, why is it that when you open a demo account for any amount, the balance is 0
 
Alexey Viktorov #:

Please help with DRAW_FILLING build type

For some reason one pair of buffers works fine, but the second refuses to accept the colour assigned in different ways.


Even tried to leave two buffers and respectively one build and the result does not change. If by high build fill colour is normal, but by low colour is not.

Here is the code

Maybe in some .ini file is stuck what setting? Maybe delete it, I don't know where to look for this file ... I don't know what to think.

DRAW_FILLING has two buffers for drawing