Announcement

Collapse
No announcement yet.

Pvt Macd

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

  • Pvt Macd

    Hi

    Will it be possible to create a MACD (parameters to the trader's choice) of the PVT (*) ?

    Default parameters should be: 26, 12, 9;
    And we should have the possibility to modify these parameters.

    Thank you !


    (*) PVT for "Price Volume Trend" (see Past thread below).

  • #2
    PVT MACD

    I tried to make a 4-ema of the PVT

    Can you tell me why this formula don't work ?

    I have this error message:

    "line 17: MaStudy parameter 3 invalid...."

    It means that the formula doesn't accept PVT as a variable...


    function preMain() {
    setPriceStudy(false);
    setStudyTitle("PVT MA");
    setCursorLabelName("PVT MA");
    }

    var PVT = null;
    var PVT_1 = null;
    var vSMA4_of_PVT = null;
    function main() {

    if(getBarState()==BARSTATE_NEWBAR){
    PVT_1 = PVT;
    }

    PVT = (((close()-close(-1)))/close(-1))*volume()+PVT_1;
    vSMA4_of_PVT = new MAStudy(4, 0, PVT, MAStudy.SIMPLE)

    return PVT;
    return vSMA4_of_PVT.getValue(MAStudy.MA);
    }

    Comment


    • #3
      pbereau
      User defined variables cannot be used with the current versions of the built-in studies.
      To accomplish what you want you need to write your own moving average or you can use the MAorEMAorWMAof_template.efs which is available in this thread (explanations are in the script and examples are available in that same thread)
      If you are not comfortable doing it yourself I would suggest you contact one of eSignal's EFS Consultants.
      Alex

      Comment

      Working...
      X