[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 269

 
Annie >> :

I'd be glad to cite the whole code here - but, despite the fact, that it's poky, primitive and undone, it still can't fit into the whole post - it swears it's too long. :-(

There's a button at the bottom - attach file :)))

 
Annie >> :

Now what to do about it?

NormalizeDouble(Bid,4);   //:))))
 
alsu >> :

By the time I've written my post, there's already an answer. >>Thank you. :-) I'll try to normalize, if it doesn't help - I'll use the magic button "attach file". :-)

 
Alsu, normalising the prices solved the problem, everything works. I had no idea there would be 5 digits in the archive of downloaded quotes. Thanks for the help. :-)
 

Good afternoon. Please help me to solve this problem. I have written a function to find the maximal value of RSI indicator on an N-bar segment.

//+--------------------------------------------------------+
//| Описание : Возвращает максимальное значение индикатора RSI, на отрезке |
//| N-баров. |
//+--------------------------------------------------------+
//| Параметры: |
//| MaxRSI - максимальное значение индикатора RSI |
//| |
//+--------------------------------------------------------+

double IsMaxRSI() {

double MaxRSI = 0;


double Max_array[20];
int c, total_c = ArraySize(Max_array);
ArraySetAsSeries(Max_array,true);
{
for(c=1; c <= total_c; c++)
Max_array[c]= iRSI(Symbol(),RSI_TF,RSI_Period,PRICE_CLOSE,c);
}

MaxRSI = Max_array[ArrayMaximum(Max_array,total_c,1)];


return (MaxRSI);
}

Now the question; How do I get the value of 20 out of the array into the variables?

double Max_array[20];


This value of 20 I need to change in external variables... Thank you in advance for your help. Sincerely Dimitri.

 

why is the signal not working?

I wanted to set the filter zone in pips from the highest high and lowest low... the signal does not work what am I doing wrong?

   double hi_100 = iHigh(Symbol(), tf_100,iHighest(NULL, tf_100,MODE_HIGH, hibar, n_bar)); //поиск хая наибольшего значения
   double lo_100 = iLow (Symbol(), tf_100,iLowest (NULL, tf_100,MODE_LOW, lobar, n_bar));  //поиск лоу наименьшего значения
   if (Bid < lo_100 + zone * Point){ open = 1;} //зона разрешения покупок от лоу
   else if (Bid > hi_100 - zone * Point){ open=-1;} //зона разрешения продаж от хая

 
1Rakso >> :

why isn't the signal working?

I wanted to set the filter zone in pips from the highest high and lowest low... The signal doesn't work, what am I doing wrong?

I got it figured out, but the question remains, why can't I output the timeframe to an external variable?

double hi_100 = iHigh(Symbol(), 0,iHighest(NULL, 0,MODE_HIGH, hibar, n_bar)); //поиск хая наибольшего значения
   double lo_100 = iLow (Symbol(), 0,iLowest (NULL, 0,MODE_LOW, lobar, n_bar));  //поиск лоу наименьшего значения
   if (Bid < lo_100 + zone * Point){ open = 1;} //зона разрешения покупок от лоу
   else if (Bid > hi_100 - zone * Point){ open=-1;} //зона разрешения продаж от хая

 

Hi all, could you please tell me how to make an object be drawn from the other side

in this example:

         objName = "ob"+ObjectsTotal();
         ObjectCreate( objName,OBJ_ARROW,0
            , xTime( window. position )
            , pp2
         );         
         ObjectSet( objName, OBJPROP_ARROWCODE,5);<--> рисуется ценовая метка с лева, а надо с парава
         ObjectSet( objName, OBJPROP_COLOR,White);
         ObjectSet( objName, OBJPROP_STYLE,2);
help me out please.
 
NEKSUS_ >> :

Hi all, could you please tell me how to make an object be drawn from the other side

in this example:

help please
ObjectSet( objName, OBJPROP_ARROWCODE,5);// левая ценовая метка
ObjectSet( objName, OBJPROP_ARROWCODE,6);// правая ценовая метка
 
Dimi >> :

Good afternoon. Please help me to solve this problem. I have written a function to find the maximal value of RSI indicator on an N-bar segment.

//+--------------------------------------------------------+
//| Описание : Возвращает максимальное значение индикатора RSI, на отрезке |
//| N-баров. |
//+--------------------------------------------------------+
//| Параметры: |
//| MaxRSI - максимальное значение индикатора RSI |
//| |
//+--------------------------------------------------------+

double IsMaxRSI() {

double MaxRSI = 0;


double Max_array[20];
int c, total_c = ArraySize(Max_array);
ArraySetAsSeries(Max_array,true);
{
for(c=1; c <= total_c; c++)
Max_array[c]= iRSI(Symbol(),RSI_TF,RSI_Period,PRICE_CLOSE,c);
}

MaxRSI = Max_array[ArrayMaximum(Max_array,total_c,1)];


return (MaxRSI);
}

Now the question itself; How do I take the value of 20 out of this array into variables?

double Max_array[20];


This value of 20 I need to change in external variables... Thank you in advance for your help. Sincerely Dimitri.

First, put the code in logical order.

ArraySetAsSeries(Max_array,true) - why?

for(c=1; c <= total_c; c++) - arrays are indexed from 0 to total_c-1.

Reason: