Announcement

Collapse
No announcement yet.

New Study

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

  • New Study

    Hi,

    I am new to this forum. I would like to create a new study with the following formula:

    {($ADV*$UVOL)*(Change in $NYA)}/($DECL*$DVOL).

    This is for plotting like any other study at the chosen time interval. I request a reply from anyone out there who is familiar with creating such studies. Thanks a lot.

    Sesh

  • #2
    PHP Code:
    //  {($ADV*$UVOL)*(Change  in $NYA)}/($DECL*$DVOL)

    function preMain() {
        
    setComputeOnClose(true);
        
    setCursorLabelName("volumeStudy"0);
        
    setDefaultBarFgColor(Color.blue,0);
    }

    function 
    main(Length) {
        var 
    adv getValue("close""$ADV");
        var 
    uvol getValue("close""$UVOL");
        var 
    decl getValue("close""$DECL");
        var 
    dvol getValue("close""$DVOL");

        var 
    nya getValue("close""$NYA"); 
        var 
    nya_1 getValue("close",-1"$NYA");  
        var 
    nyaChange nya nya_1;

        var 
    volumeStudy 0;

        var 
    numerator =   adv uvol nyaChange
        var 
    denominator decl dvol
        if (
    denominator !=0volumeStudy numerator/denominator;

        return 
    volumeStudy;  

    Attached Files

    Comment


    • #3
      Thanks

      Hi xygeek,

      Thanks a bunch.

      Comment

      Working...
      X