Errors, bugs, questions - page 3168

 
Yury Stukalov #:
I think the mt4 was a tester. you can add an indicator, run the tester and do not just look at the chart movement on the screen but hit pause, draw a line, cross, arrow, check mark and then hit start again. i need it as a training tool for those who trade by hand. in mt5 you can't add anything to the chart, not even a little arrow to indicate where i'd buy or sell. the question is how to solve the problem. maybe it all exists but somehow camouflaged?

The template solves the problem of adding the right indulgences. I don't know about drawing.

 

Can you tell me why these settings are not saved and working in the trade settings? The commission and non-working period settings are applied. But if you change the settings in this tab, they are reset to default again after closing. How do I make these settings work?

 
Hello! I realise this isn't the most important topic at the moment...

But it's not the first time this has happened, the number 1 has beenhangingin posts for a week now, while dialogs and private ones have read everything.../creepy tense.

If a moderator can resolve this issue, it would be appreciated.
 
Thank you ) the message has disappeared, very quick response :)
 

x572intraday #:

   int dim=5;
   int Arr1[5];// OK
   int Arr2[dim];// '[' - invalid index value

Either I'm totally fucked up, or, if not a bug, poke me in the Help.

Citizens. A year ago I released an indicator in KB. Now I dug - there are strings in several places, where a variable serves as an array element. Either I am completely crazy... Anyway, if you want to know, I can show you.

 
x572intraday #:

Citizens. A year ago I released an indicator in KB. Now I dug - there are lines in several places, where a variable serves as an array element absolutely calmly. Either I am completely crazy... Anyway, if you want to know, I can show you.

Maybe #define was there?
 
Nikolai Semko #:
Maybe #define was there?

#define is there, of course:

#define  NUMBER 26

but it refers to other strings. I meant quite different ones.https://www. mql5.com/ru/code/34280 - search for "[el]". But there's an array by reference & - maybe that's why?

Мультитаймфреймовый индикатор фракталов и индикатор технической разметки на его основе.
Мультитаймфреймовый индикатор фракталов и индикатор технической разметки на его основе.
  • www.mql5.com
Живая мультитаймфреймовая авторазметка с помощью Fibonacci Time Zones, Andrew's Pitchforks, Equidistant Channels на основе индикатора Fractals
 
x572intraday #:

#define is there, of course:

but it refers to other strings. I meant quite different ones.https://www. mql5.com/ru/code/34280 - search for "[el]". But there's an array by reference & - maybe because of that?

I looked it up.
is what I thought it would be:

#define  NUMBER 26

...


color ClrArray[NUMBER/2]={0x444444,0x616161,0x334432,
                          0x3c5c3b,0x41733f,0x418e3e,
                          0x31ab2b,0x30a774,0x18d3b8,
                          0x00d1ff,0x4fe3fc,0x1efffd,
                          0xf6f6f6};

color ClrAltArray[NUMBER/2]={0x590304,0x622a04,0x783c00,
                             0x8b5100,0xaa6f00,0xbd8d02,
                             0xda8300,0xf46c00,0xff6b59,
                             0xff848c,0xff9db6,0xffd8e2,
                             0xfff5f8};

color ClrAuxArray[NUMBER/2]={0x030359,0x040462,0x000078,
                             0x00008b,0x0000aa,0x0000c8,
                             0x0000da,0x0000f4,0x7855ff,
                             0xaf6eff,0xe469ff,0xfb7bd6,
                             0xff69ab};

ENUM_TIMEFRAMES PArray[NUMBER/2];

it's not a dynamic array, it's a static one. NUMBER is number 26, not a variable. Study the preprocessor commands.
no other variable substitutions were found when declaring an array.
so - miracles don't happen.

 
Nikolai Semko #:

I looked it up.
as I thought it would be:

it's not a dynamic array, but a static one. NUMBER is number 26, not a variable. Study the preprocessor commands.
no other variable substitutions were found when declaring an array.
so - there are no miracles.

You were not paying attention... but that's understandable - it's a big code. I mean quite different strings. Look for it:

PriceExtr[el]
TimeExtr[el]

There's no #define for el.

...Although, there is this code in struct TBuffer:

   double PriceExtremumFTZ[2];
   double TimeExtremumFTZ[2];

where static arrays with number 2 are declared and then passed by &:

                     FindNearbyFractalsForFTZ(Buffer_Array[tf/2].PriceExtremumFTZ,
                                              Buffer_Array[tf-(UpOrDown-1)/2].PrepsBuffer[shift],
                                              Buffer_Array[tf/2].TimeExtremumFTZ,
                                              Buffer_Array[tf-(UpOrDown-1)/2].PrepTimesBuffer[shift],
                                              Buffer_Array[tf/2].bars_calculated,
                                              TFsSumVFlag,
                                              PArray[tf/2],
                                              ClrArray[tf/2],
                                              ClrAuxArray[tf/2],
                                              UpOrDown);
...
void FindNearbyFractalsForFTZ(double &PriceExtr[],
                              double PriceCur,
                              double &TimeExtr[],
                              double TimeCur,
                              int bars_calculated,
                              int visibility,
                              ENUM_TIMEFRAMES tf,
                              color clr,
                              color clr_aux,
                              char sign
                             )
Maybe that's the trick?
 
x572intraday #:

You weren't looking carefully... although that's understandable - it's a big code. I mean other lines. Look it up:

There's no #define for el.

...Although, there is this code in struct TBuffer:

where static arrays with number 2 are declared and then passed by &:

Maybe that's the trick?

No, it's not.

When declaring a static array, its size is specified in brackets.

It must be known during compilation and cannot be set by a variable.

When addressing an array item, the item's index is put in brackets.

It can be set by a variable, otherwise such an array would not be needed at all.