Announcement

Collapse
No announcement yet.

Actual price

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

  • Actual price

    Good morning to all,
    I have lot's of right information on the column and manny time i lost the actual price value .
    Is possible show at the top of the bar the current price ?
    in the detail windows is possible show only open high low close
    thank u in advance for any help

  • #2
    Good morning,

    1- Right click on the data window:
    a- Unselect any efs studies you don't want displayed in the data window
    b- Select & click on "Properties"
    c- This will open the "Chart Properties" window and the "Data Window" tab.
    -- Remove checkmark from all check boxes starting with the "Compact mode" and below.


    Now your Data Window should look like this:

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	1.5 KB
ID:	242894

    To get the last trade price ontop of the most current bar try: lastPrice.efs

    PHP Code:
    //lastPrice.efs
    function preMain(){
        var 
    aFPArray = new Array();
        
    setPriceStudy(true);
        
    setCursorLabelName("",0);
        var 
    x=0;
        
    aFPArray[x] = new FunctionParameter("bDisplayPrice"FunctionParameter.BOOLEAN);
        
    with(aFPArray[x++]){
            
    setName("Show Price");
            
    setDefault(true);
        }
        
    aFPArray[x] = new FunctionParameter("sFontSize"FunctionParameter.NUMBER);
        
    with(aFPArray[x++]){
            
    setLowerLimit(5);
            
    setName("Font Size");
            
    setDefault(10);
        }
        
    aFPArray[x] = new FunctionParameter("p_Pos"FunctionParameter.STRING);
        
    with(aFPArray[x++]) {
            
    setName("Price Location");
            
    addOption("TopRow1");
            
    addOption("TopRow2");
            
    addOption("TopRow3");
            
    addOption("TopRow4");
            
    addOption("AboveBar1");
            
    addOption("AboveBar2");
            
    addOption("AboveBar3");
            
    addOption("AboveBar4");
            
    addOption("BelowBar1");
            
    addOption("BelowBar2");
            
    addOption("BelowBar3");
            
    addOption("BelowBar4");
            
    addOption("BottomRow1");
            
    addOption("BottomRow2");
            
    addOption("BottomRow3");
            
    addOption("BottomRow4");
            
    setDefault("AboveBar1");
        }
        
    aFPArray[x] = new FunctionParameter("p_Centered"FunctionParameter.BOOLEAN);
        
    with(aFPArray[x++]) {
            
    setName("Centered on Bar");
            
    setDefault(false);
        }
    }

    var 
    bInit=false;
    var 
    pricePos;
    function 
    main(bDisplayPrice,sFontSize,p_Pos,p_Centered){
        var 
    pColor;
        if(!
    bInit){
            
    pricePos = eval(p_Pos);
            
    bInit=true;
        }
        if(
    close(0)>open(0)) pColor=Color.green;
        else if(
    open(0)>close(0)) pColor=Color.red;
        if(
    bDisplayPrice){
            if(
    pColor!=null){
                if(!
    p_CentereddrawTextRelative(0pricePosgetMostRecentTrade(), pColornullText.PRESET Text.VCENTER Text.ONTOP Text.BOLD"Courier New"sFontSize"price"); 
                else 
    drawTextRelative(0pricePosgetMostRecentTrade(), pColornullText.PRESET Text.VCENTER Text.CENTER Text.ONTOP Text.BOLD"Courier New"sFontSize"price"); 
            }
        }
        return;


    Wayne
    Last edited by waynecd; 09-04-2013, 04:40 PM.

    Comment


    • #3
      thanks a lot Wayne

      Comment


      • #4
        yw

        Wayne

        Comment

        Working...
        X