[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 346

 
Roman.:
Can anyone suggest - how to find, most easily, all (or not all, but some) of your posts on the forum in a particular thread?

Go to your Profile and follow the "all comments" link to find your posts.
 
DhP:

Go to your Profile and click on "all comments" to find your posts.

Thanks, I'll look again, but so far it says "An error has occurred. Please try again later."
 

Hello.

Here is a datetime value. What function should I use to get the integer value i from datetime in Close[ i ] ?

 
Zar:

Hello.

Here is a datetime value. What function should I use to get the integer value i from datetime in Close[ i ] ?



iBarShift
 

Question on testing in Open Price mode -

Suppose the BAR_High= 60 pips and Take_Profit= 30 pips <<= The tester will correctly close the order with +30 pips.

But in this mode, it (the tester) will see the close price (and thus the height) of the candle while it is testing the same candle? Or when it moves to the next following candlestick?

 
chief2000:

Question on testing in Open Price mode -

Suppose the BAR_High= 60 pips and Take_Profit= 30 pips <<= The tester will correctly close the order with +30 pips.

But in this mode, it (the tester) will see the close price (and thus the height) of the candle while it is testing the same candle? Or when it moves to the next following candlestick?

This is easy to check. When a candlestick is open, insert Print()

datetime old_Time=0;
// в инициализации

// в старт
if(old_Time!=Time[0]) { old_Time=Time[0]; Print(High[0],Low[0], Close[0],...);}
 
KONDOR:

this is easy to check. when opening a candle, insert Print()

Being a third-generation shaman, I'm willing to predict that four identical values will be printed.

PS If old_Time is static, or if it's global.

 
-xlapex-:

We cycle through the volume values and find the minimum. How do we find the index of this bar?

I have used the following loop:

extern int Int Quant_Bars=5;
//-----------------------
int start()
{
int i;
double Minimum=10000;

for(i=0;i<=Quant_Bars-1;i++)
{
if (Volume[i]< Minimum)
Minimum=Volume[i];
}
Alert("Minimum ",Minimum);
return;
}


The zero cell of the array will contain the value corresponding to the zero candle. The first cell will contain the value corresponding to the first candle. And so on into the past.
 

HELP please!

Something is wrong with the visualiser and the tester. The trades are displayed incorrectly on the picture, and there is no logic where everything is shifted to. I tried different strategies (Sidus on the picture), reinstalled the terminal deleting the folder and wiping the registry, ran on Linux. Everywhere the same thing. Deals in the air. What the hell is this? Alpari 399 terminal.

 
-xlapex-:
Please help me with this question:

The ArrayMinimum() function, when applied to tick volumes, defines a bar with minimal volume value and returns its index. The problem is this: I need to determine the index of the bar that also has minimal volume, but higher than the one determined by this function (i.e. the second "minimal"). How can this be done?


You can do it like this: you declare a two-dimensional array, transfer the required data from the series to it, then sort it by the first dimension. The second dimension will contain the bar numbers. To illustrate, see how it works with an example

int start()       {
int mas1[5]={3,9,5,8,1};
int mas2[5][2];

for(int i=0;i<5;i++)
   {
   mas2[i,0]=mas1[i];
   mas2[i,1]=i;
   Print("first - ",mas2[i,0]," sec - ",mas2[i,1]);
   }
ArraySort(mas2);
Print("После сортировки");
for(i=0;i<5;i++) 
   {
   Print("first - ",mas2[i,0]," sec - ",mas2[i,1]);
   }  
return(0);
}
Reason: