Announcement

Collapse
No announcement yet.

Price/Volume Chart & Ticks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Price/Volume Chart & Ticks

    Greetings,

    ¿Is there any way for getting the info who is displayed into Price/Volume esignal standard charts?.

    I've tryed with:


    var xClose;
    var xVolume;

    function main(Symbol){
    if(bInit == false){
    if(Symbol == null) Symbol = getSymbol();

    var vSymbolT = Symbol+",T";

    xClose = close(sym(vSymbolT));
    xVolume = volume(sym(vSymbolT));

    bInit = true;
    }

    debugPrint(xClose.getValue(0));
    debugPrintln( xVolume.getValue(0));

    return null;
    }

    but don't work fine. My purpose is to get two arrays; one for daily price info and other for daily volume info.

    Thanks very much.

  • #2
    cls

    ¿Is there any way for getting the info who is displayed into Price/Volume esignal standard charts?
    The data in that chart type is not available to efs.

    My purpose is to get two arrays; one for daily price info and other for daily volume info.
    To do that you would need to use the Array Object (see the link for the description and syntax of the object and of its methods and properties)
    Enclosed below is a basic example that would store the Close in an array. Also if you run a search through the forums you will find many other examples including some for multi-dimensional arrays.
    Alex


    PHP Code:
    var aClose = new Array();
     
    function 
    main(){
     
        if(
    getBarState()==BARSTATE_NEWBAR){
            
    aClose.unshift(close(0));
        }else{
            
    aClose[0] = close(0);
        }
        
    //aClose[0] is the current value of Close, aClose[1] the Close at prior bar, aClose[2] two bars ago etc
        //rest of your code

    Comment

    Working...
    X