Error message:
[' - array index is to be an integer
error seems to be here. but i couldnt figure out.
iYestHigh=High[iYestHigh]; iYestLow=Low[iYestLow];
Error message:
[' - array index is to be an integer
error seems to be here. but i couldnt figure out.
don't you see ?? is it string, double, integer, color, ........ or is it all together and can we change every tick again
iYestHigh=High[iYestHigh]; //same name before same name after iYestLow=Low[iYestLow];
Whats wrong with this code?
I get previous day high/low/close and start calculation.
To get previous day high/low/close i got simple code here. just added some code for previous day low,close and calculations.
when i compile which shows error message
[' - array index is to be an integer
Here is the code i tried:
This says it all . . . "array index is to be an integer"
double iYestHigh = 0; double iYestLow = 0; iYestHigh = High[ iYestHigh ]; iYestLow = Low[ iYestLow ];
Yes. i set as int.
but how to change as double. bcoz it says single decimal.
when i do calculations it take first decimal point only.
eg:
need to get range. so we use 1.3150-1.3080, but it says only "1". please clear my doubt!
My Code:
// int ToDaysHighestPrice = iHigh(NULL, PERIOD_D1, 0); // int YesterDaysHighestPrice = iHigh(NULL, PERIOD_D1, 1); datetime today = iTime(NULL, PERIOD_D1, 0), yesterday = iTime(NULL, PERIOD_D1, 1); int iToday = iBarShift(NULL, 0, today), iYesterday= iBarShift(NULL, 0, yesterday), iTodayHigh= Highest(NULL,0,MODE_HIGH, iToday+1, 0), // or not incl. 0 bar: ..iToday, 1) iYestHigh = Highest(NULL,0,MODE_HIGH, iYesterday-iToday, iToday+1), iTodayLow= Lowest(NULL,0,MODE_LOW, iToday+1, 0), // or not incl. 0 bar: ..iToday, 1) iYestLow = Lowest(NULL,0,MODE_LOW, iYesterday-iToday, iToday+1), YestHigh=High[iYestHigh], YestLow=Low[iYestLow], YestClose=iClose(NULL,PERIOD_D1,1); Comment("yesterday's high ", YestHigh ,"yesterday's Low ",YestLow ,"Close: ",YestClose);
Yes. i set as int.
but how to change as double. bcoz it says single decimal.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Whats wrong with this code?
I get previous day high/low/close and start calculation.
To get previous day high/low/close i got simple code here. just added some code for previous day low,close and calculations.
when i compile which shows error message
[' - array index is to be an integer
Here is the code i tried: