I have a couple of questions on how to preserve the Bid/Ask analysis when different symbols on the same chart.
1. How can I avoid reinitializing the study when I type the same stock symbol on the chart? I was thinking about something like this but it doesn't seem to work...:
var lastSymbol = "";
preMain() {
if( lastSymbol == getSymbol() ) { // Old symbol requested?
return;
}
}
main() {
lastSymbol = getSymbol(); // Assign stock symbol
}
2. Is there a way to access the Time&Sales information for the day (they're available in the Time&Sales window) rather then collecting them in real-time through the chart API? This way I could rebuild the Bid/Ask analysis everytime I switch symbol on the chart.
1. How can I avoid reinitializing the study when I type the same stock symbol on the chart? I was thinking about something like this but it doesn't seem to work...:
var lastSymbol = "";
preMain() {
if( lastSymbol == getSymbol() ) { // Old symbol requested?
return;
}
}
main() {
lastSymbol = getSymbol(); // Assign stock symbol
}
2. Is there a way to access the Time&Sales information for the day (they're available in the Time&Sales window) rather then collecting them in real-time through the chart API? This way I could rebuild the Bid/Ask analysis everytime I switch symbol on the chart.
Comment