Spread between two futures - page 5

 

And then, without any warning, the history is gone, and I don't even know why :-( Sad.

Just a trader you write history with an owl, right? As for me I have an EA that writes everything inside the 1-minute bar, but no matter how you slice it, the last value of that one-minute bar is always left on the history. But the idea is to work on the zero bar and for me the quote speed of Opener can FOREVER sit and wait for coming up asc or bid.

How many trades per day or so you make, ProstoTrader?

Again What is the significance of the yellow line? Right now it's shifted downwards so it's not the centre between the spreads...

The thing is that even though that EA is writing inside a minute, but when I create an indicator, it still takes a minute. Since my strategy is market driven due to lack of capital, I have to risk a lot, nevertheless I will start writing history and see what I can get out of these data, although I think it may be useless if I approach them (data) with an axe, but what if.....? Well that's another story.

ProstoTrader, fraternally please answer my questions, I would be very grateful to you!

 
Look, a closer look at the code and the thought. As many people as there are manners of writing code. Everyone has their own style. You write great, literally 20 minutes and oppa I already have an indicator that can be read in full in the EA, and before that I've figured out how to combine 5 values into three that will fully reflect the situation. For the grid, it's the best. I'm not going to lie, it took some effort with my programming skills. I had to thoroughly delve into the code and kind of how it is written, but what I found out is that the horizontal lines are not so straight and it is this shift of spread up or down is a long-term vane, if you get my drift, and if I got into this topic correctly!!!!!
 
Mihail Marchukajtes:


ProstoTrader, please fraternally answer my questions, I would be very grateful!

I have no time - busy at the construction site, have to close the warm loop in time for winter.

Can't rely too much on this indicator, which "picks up" the first in the queue and bid needs to handle all the ticks,

it will only be possible through CCanvas.

https://www.mql5.com/ru/forum/351753

I've never written charting code, and I don't have time to figure it out now (I'll get to it in winter).

Индикатор из советника для работы с тиками (CChartCanvas)
Индикатор из советника для работы с тиками (CChartCanvas)
  • 2020.09.22
  • www.mql5.com
Биржевой трейдинг: Индикатор из советника для работы с тиками (CChartCanvas)
 
prostotrader:

I have no time - I am busy on the construction site, I have to close the warm circuit in time for winter.

You can't rely too much on this indicator, which "snatches" the first in the ask queue and bid needs to handle all the ticks,

it will only be possible through CCanvas.

https://www.mql5.com/ru/forum/351753

I've never written charting code, and don't have time to figure it out now (I'll get to it in winter).

That's a shame, construction is a thing. But I don't need to draw anything, I plan to write minutiae into a file and load them into EA for neuronics later. The plan is as follows. I will be glad to hear the explanations :-)
 

The final version

Added

Added chart scaling

Files:
1_sp.mq5  46 kb
 
prostotrader:

The final version

Added

Added chart scaling


2020.11.12 12:19:47.166	1_sp (Si-12.20,M1)	indicator is too slow, 11029 ms. rewrite the indicator, please
2020.11.12 12:20:04.794	1_sp (Si-12.20,M1)	array out of range in '1_sp.mq5' (352,50) 

 
Dmi3:



Break down receiving data into parts

enum IND_STAGE
{
  FIRST_ENTRY = 0,
  LOAD_TICKS = 1,
  READ_PRIM_TICKS = 2,
  READ_SEC_TICKS = 3,
  FILL_DATA = 4
};
  if(prev_calculated == 0)
  {
    switch (mar_data.stage)
    {
      case FIRST_ENTRY:
        ArrayInitialize(Hi_Buff, EMPTY_VALUE);
        ArrayInitialize(Low_Buff, EMPTY_VALUE);
        ArrayInitialize(a_Hi_Buff, EMPTY_VALUE);
        ArrayInitialize(a_Low_Buff, EMPTY_VALUE);
        mar_data.stage = LOAD_TICKS;
        return(0);
      break;
      case LOAD_TICKS:
#ifdef  DEBUG      
        if(LoadTicks(time) == true)
        {
          ArrayResize(mar_data.t_data, mar_data.b_cnt);
          ZeroMemory(mar_data.t_data);
          mar_data.stage = READ_PRIM_TICKS;
        }
        else
        {
          Print("Load ticks failed!");
         return(0);  
        } 
        if(ReadPrimTicks() == true)
        {
          ArrayResize(mar_data.pr_ticks, 0);
          mar_data.stage = READ_SEC_TICKS;
        }else return(0);
        if(ReadSecTicks() == true)
        {
          ArrayResize(mar_data.sec_ticks, 0);
          mar_data.stage = FILL_DATA;
        }else return(0);
        ArraySetAsSeries(mar_data.t_data, true);
        FillData();
        mar_data.stage = FIRST_ENTRY;
#else   
        if(LoadTicks(time) == true)
        {
          ArrayResize(mar_data.t_data, mar_data.b_cnt);
          ZeroMemory(mar_data.t_data);
          mar_data.stage = READ_PRIM_TICKS;
        }
        return(0);
#endif  
      break;
      case READ_PRIM_TICKS:
        if(ReadPrimTicks() == true)
        {
          ArrayResize(mar_data.pr_ticks, 0);
          mar_data.stage = READ_SEC_TICKS;
        }  
        return(0);
      break;
      case READ_SEC_TICKS:
        if(ReadSecTicks() == true)
        {
          ArrayResize(mar_data.sec_ticks, 0);
          mar_data.stage = FILL_DATA;
        }  
        return(0);
      break;
      case FILL_DATA:
        ArraySetAsSeries(mar_data.t_data, true);
        FillData();
        mar_data.stage = FIRST_ENTRY;
      break;
    }
  } 

Si-12.20 vs Eu-12.20


 
Mihail Marchukajtes:
That's a shame, construction is a thing. But I don't need to draw anything, I plan to write minutiae into a file and load them into EA for neuronics later. The plan is as follows. I will have time to hear the explanations :-)
Judging by the indicator above, there is nothing to catch
 
Renat Akhtyamov:
From the indicator above, there's nothing to catch.
I've already given up on it. There are no fish in it!!!!
 
Mihail Marchukajtes:
I already gave up on it. There are no fish in it!!!!

Three Finnish brothers are fishing in the Gulf of Finland

In the morning, the sun is starting to rise, the youngest brother says:
- The sun ishigh... The middle brother says:
- The teacher does not bite
It's evening, the sun has gone down, the oldest brother says:
- Kauvaritte Multokka and the new one bites!!!


P.S. The fish is all right there, you should know how to catch it :)