[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 451

 

I can't figure out why the EA is swearing at the indicator.

It's giving me an error:

2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function
2011.12.24 16:59:05     2010.02.01 00:26  TREND EURUSD,Daily: unknown subwindow number -1 for ObjectCreate function

I have indicated in the Expert Advisor:

   double goodup_1 = iCustom (NULL, 0, "TREND",0,0);
   double goodup_2 = iCustom (NULL, 0, "TREND",2,0);
   double goodup_3 = iCustom (NULL, 0, "TREND",4,0);

   double gooddown_1 = iCustom (NULL, 0, "TREND",1,0);
   double gooddown_2 = iCustom (NULL, 0, "TREND",3,0);
   double gooddown_3 = iCustom (NULL, 0, "TREND",5,0);

Please tell me what my mistake is.

I am attaching the indicator.

Files:
trend.mq4  22 kb
 
belck:

I can't figure out why the EA is swearing at the indicator.

It's giving me an error:

I have indicated in the Expert Advisor:

Please tell me what my mistake is.

I am attaching the indicator.


Can't seem to find the indicator window
 
Vinin:

The indicator window can't seem to find

why? and do what?

мне посоветовали закоментировать все Object.

I changed it

в ObjectCreate("ditog3v", OBJ_LABEL, WindowFind(short_name), 0, 0);
WindowFind(short_name) на 0

the error has gone but EA did not react to the signals and therefore orders did not open.

закоментировал только строки ObjectCreate и вернул назад WindowFind(short_name)

i still got the error.

 

Hi all, has anyone come across an indicator that reads EURUSD60.hst file and draws high timeframe candles on the M5 chart? I need it to read.

 
I commented out all Objects.
But the EA does not react to indicator signals.
Maybe I missed something in these lines:
double goodup_1 = iCustom (NULL, 0, "TREND",0,0);
double goodup_2 = iCustom (NULL, 0, "TREND",2,0);
double goodup_3 = iCustom (NULL, 0, "TREND",4,0);

double gooddown_1 = iCustom (NULL, 0, "TREND",1,0);
double gooddown_2 = iCustom (NULL, 0, "TREND",3,0);
double gooddown_3 = iCustom (NULL, 0, "TREND",5,0);
 
belck:
I commented out all Objects.
But the EA does not react to indicator signals.
I may have missed something in these lines:


Can you tell me what it is?

     UP_1Buffer[0] = StrToDouble(uitog1v);
     UP_2Buffer[0] = StrToDouble(uitog2v);
     UP_3Buffer[0] = StrToDouble(uitog3v);
     DOWN_1Buffer[0] = StrToDouble(ditog1v);
     DOWN_2Buffer[0] = StrToDouble(ditog2v);
     DOWN_3Buffer[0] = StrToDouble(ditog3v);
 
Vinin:


Can you tell me what this is?

as I understand it, this is how I copy the indicator results to the buffer.

 
belck:

as I understand it, this is how I copy the indicator results to the buffer.



Buffers are described as double and you put string there
 
Vinin:

Buffers are described as double, and you put string there

I took the signals from another indicator, and that's how it is:


   string Trend_UP = DoubleToStr(((TrendUP/Indy_count)*100),0);

   string Trend_DOWN = DoubleToStr((100 - StrToDouble(Trend_UP)),0);

   UPBuffer[0] = StrToDouble(Trend_UP);
   DOWNBuffer[0] = StrToDouble(Trend_DOWN);

I got it wrong that instead of

StrToDouble - нужно поставить другое. подскажите на что заменить?
 
belck:

I took the signals from another indicator, and that's how it is:


I got it wrong, that instead of


     UP_1Buffer[0] = uitog1v;
     UP_2Buffer[0] = uitog2v;
     UP_3Buffer[0] = uitog3v;
     DOWN_1Buffer[0] = ditog1v;
     DOWN_2Buffer[0] = ditog2v;
     DOWN_3Buffer[0] = ditog3v;

But it is necessary to edit the indicator header. That all buffers could store the value

#property indicator_buffers 6

And it would be nice to calculate the history, but of course it's a matter of taste. And to work with objects more correctly. On each tick objects with the same names are created (or generate an error).