Announcement

Collapse
No announcement yet.

Parabolic SAR price source

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

  • Parabolic SAR price source

    Hi everyone,

    How do I define the price source of a Parabolic SAR? I want to specify a MA as source, but it pics up main symbol as source by default.

    var study1 = new MAStudy(12, 0, "Close", MAStudy.EXPONENTIAL);
    var study2 = new MAStudy(21, 0, "Close", MAStudy.EXPONENTIAL);
    var xPARstudy = sar( 0.015, 0.015, 0.200, study2);

    Any help would be appreciated.

    Kind regards,
    tbfx

  • #2
    tbfx
    You need to use the ema() function and not the legacy MAStudy() function to do that
    For the description and syntax of the ema() function see the EFS KnowledgeBase
    As an aside in 11.5 you can accomplish the same without the need of an efs by applying studies on studies using the Built-in Studies
    Alex


    Originally posted by tbfx View Post
    Hi everyone,

    How do I define the price source of a Parabolic SAR? I want to specify a MA as source, but it pics up main symbol as source by default.

    var study1 = new MAStudy(12, 0, "Close", MAStudy.EXPONENTIAL);
    var study2 = new MAStudy(21, 0, "Close", MAStudy.EXPONENTIAL);
    var xPARstudy = sar( 0.015, 0.015, 0.200, study2);

    Any help would be appreciated.

    Kind regards,
    tbfx

    Comment


    • #3
      Alex,

      Thanks for your quick response. Do I understand you correctly ... are you saying I need to make the following change?

      var study2 = ema(21);
      var xPARstudy = sar( 0.015, 0.015, 0.200, study2);

      Kind regards,
      tbfx

      Comment


      • #4
        tbfx
        That is correct
        Alex


        Originally posted by tbfx View Post
        Alex,

        Thanks for your quick response. Do I understand you correctly ... are you saying I need to make the following change?

        var study2 = ema(21);
        var xPARstudy = sar( 0.015, 0.015, 0.200, study2);

        Kind regards,
        tbfx

        Comment


        • #5
          Perfect ... thanks!

          Comment

          Working...
          X