As presented in the attached file, I would like to fill up the later part of the main(), under else{}, which is now empty. I would like to make the two variables, MeanValue and Sd, to be the same as those ones calculated in the upper part, which is under the condition of time=4:00:00. So that at the end, these three lines refkected on the chart will be horizontal from 6 am to 4 am, and change immediately from 4 am to 6 am. (time between 4 to 6 has been taken out from the chart). Could anybody help me with that? if you can do directly on the code will be better! Thank yo!!!
Announcement
Collapse
No announcement yet.
A simple data transfer problem
Collapse
X
-
Hi teresali,
If you make "MeanValue, uppBond, lowBond" variables global by placing them outside of main you should correctly plot the lines from 4 am to 4 am. To do this, replace the following code:
PHP Code:setDefaultBarFgColor(Color.green, 5);
}
function main( ) {
var MeanValue;
var Sd ;
var uppBond;
var lowBond;
//The value of Hour, Minute and Second need to be changed to user-defined.
if (
getHour() == 4 &&
getMinute() == 0 &&
getSecond() == 0
) {
PHP Code:setDefaultBarFgColor(Color.green, 5);
}
var MeanValue;
var uppBond;
var lowBond;
function main( ) {
var Sd ;
//The value of Hour, Minute and Second need to be changed to user-defined.
if (
getHour() == 4 &&
getMinute() == 0 &&
getSecond() == 0
) {
Last edited by waynecd; 08-22-2010, 11:38 AM.
Comment