[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 226

 
Pavel447 писал(а) >>

Hello, I have a question: What should be added to the code indicator NonLagAma (it gives buy and sell signals by changing the colour of the line), what would be the output of a sound signal or a graphic (eg in a separate window) with a corresponding indicator signal. I want, say, tied to a specific time frame, but that would alert multiple currency pairs....

If anybody can help or suggest something, I'd be very grateful!

I am not sure how to do it ... :)

It should help :)

Files:
 
mgribachev писал(а) >>

Should help :)

Is this already a modified version?

The Alert Mode and Warning MOde have zeros in the input prameters, do I need to change this value?

In this version is the signal sound?

And in general, thanks for the quick reply to the first post!:)

 
alsu >> :

last two by opening time or closing time?

The last two last closing times (trades held - profit or loss taken)

 
Please help with the code?! The standard deviation of the data in the array is not calculated. The problem requires that each K-maximum(minimum) corresponds to its own standard deviation calculated on the same interval where the absolute values are searched. Thank you!
int start()
  {
   int i, k, counted_bars=IndicatorCounted();
//----   
   double num_array[5000], MAXR8, MINR8, StdDev8;
//---- 
   i=Bars- Period1+1;
   if( counted_bars> Period1-1) 
   i=Bars- counted_bars-1;
//----       
   while( i>=0)
        {
//----
        k= i+ Period1-1; 
        while( k>= i) 
             {
             num_array[ k]=Close[ k]/Close[ i+1];
             
             MAXR8= num_array[ArrayMaximum( num_array,8, k)];
             MINR8= num_array[ArrayMinimum( num_array,8, k)];
             
             // стандарстное отклонение не работает
             StdDev8=iStdDevOnArray( num_array,0,8,0,MODE_SMA, k);
             
             k--;
             }  
//----
       Buffer[ i]=;
       i--;
       }
//----
   return(0);
  }
 
001 писал(а) >>

Guys, explain what this situation means.

Code:

if(High[0] > enve_start && enve_start > Low[0]) -> trying to catch price crossing the envelopes line.

Log entry: High[0] = 1.0726 enve_start = 1.0751 Low[0] = 1.0726.

I.e. the high and the low in the candle are the same. The same for any candlestick.

High[0] & Low[0] will be the same in most cases, since the candle is zero.

 

How can I select the last 2 trades already closed (from the account history list)?

There must be something like this

OrderSelect(Parametr,SELECT_BY_POS,MODE_HISTORY)==true
how to write the correct parameter to select?
 

xrust писал(а) >>

High[0] & Low[0] will be the same in most cases as candle zero count from the first

Thanks for the reply. Is it correct to write

if ((High[0] > enve_stop > Low[1]) or is it better to write both of them first?

 
skifodessa >> :

Hello all, how can i prescribe the values of two levels (i see the picture). - High of the last green bar in AO (if current red) and Low of the last red bar before the green. Thank you.

You need to determine at which bar the colour changes, find the time through iTime(from the found bar) and knowing the time set the mark.

 
001 >> :

Thank you for your reply. Is it correct to write it like this

if ((High[0] > enve_stop > Low[1]) or would both of the former be better?

I would do it like this:

if ( Close[2]>= enve_stop && Close[1]< enve_stop )  {//пересечение сверху вниз  
 
Mr-Franklyn >> :
Please help with the code?! The standard deviation on data assisted in an array is not calculated. The problem requires that each K-maximum(minimum) corresponds to its own standard deviation calculated on the same interval where the absolute values are searched. Thank you!

the code is quite crude.

See: i=Bars-Period1+1 at the first iteration of the loop, we get k=i+Period1-1=Bars-Period1+1+Period1-1=Bars and then Close[k], which means we are already out of the array.

Correct: i=Bars-Period1-1

Next - why at each iteration of i we fill the array anew with Period1 values (with a shift of only 1 - i--)?

Why at each iteration of k we consider the standard deviation over the entire array - it's 5000 long, and there are zeros! (number 500, as I understand it, is chosen as "obviously" bigger than Bars)?

The correct way is to first fill the array, and then (in a new loop) perform calculations.

At each iteration of k StdDev8 is calculated - a question: why? We'll lose this value at each change of k, and, as I understand it, we want to use it only after the end of the loop.


Tip: draw yourself an algorithm flowchart, walk through it, writing down everything that happens, including loops. Make sure that the algorithm does exactly what you want it to do. Only then proceed to translate it into programming language. No need to be shy - everyone starts with it, and many of those who appreciate the usefulness of the method don't stop:)))

Reason: