[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 262
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can you tell me how to determine the price coordinate of a graphical object of type OBJ_LABEL?
Use ObjectGet with parameters OBJPROP_XDISTANCE, OBJPROP_YDISTANCE
1 question.If there is a number 10 in brackets for the name of an array, it means that there are 11 elements in that array
Question 2. I should make sure that there are no zeros after the array's end_set, but all the prices from the Allow_set to the end_set should be there . Am I doing the ArrayResize correctly?
//global
price[10];
int i =-1;
//-------------------
int start()
{
if(!TF_F_NewBar())return(0);
if(Allow_setting == true)
{
i++;
ArrayResize(price, i);//I take it that the price[10] array will remain price[0] (is this allowed ?),
//i.e. one place in the array where zero is written. So with every step (bar) we will
//increase size of the array
price[i] = Close[1] ; // I write Close[1] instead of zero into this one place array. If this is allowed,
// then you can specify the minimum array price[0];
}
if(end_set== true)
{
Array data processing ;
i = -1; //after processing, return to original position
}
}
Apologies for putting the code in the wrong way as it should be.
1 question.If there is a number 10 in brackets for the name of an array, it means that there are 11 elements in that array
Question 2. I should make sure that there are no zeros after the array's end_set, but all the prices from the Allow_set to the end_set should be there . Am I doing the ArrayResize correctly?
Do you want to get 10 close prices of the last 10 bars into the array?
Sorry, I didn't put the code in the right way.
Do you want to array the last 10 prices close to the last 10 bars?
You can always tweak what you have written, just click on "Edit".No, not 10, but Allow_select before end_select. This can be either 40 or 65. It should not have zeros after the end_set in the array
That's fine, just set the array as dynamic at the beginning:
No, not 10, but Allow_select before end_select. This can be either 40 or 65. It should not have zeros after the end_set in the array
I don't know how many elements an array should have. It could be 40 or 65. In a word, we need a dynamic array
I don't know how many elements an array should have. It could be 40 or 65. In a word, we need a dynamic array
I'll ask you from the other side. Why do you need to fill an array with close prices? double close[] itself is already an array of close prices.