Announcement

Collapse
No announcement yet.

SetBarStyle - PenStyle

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

  • SetBarStyle - PenStyle

    Hi,

    Can anyone explain how to make work PenStyles other than SOLID, even when generated with the Wizard?

    Thank you.
    Mihai Buta

  • #2
    Mihai
    If you are referring to the drawLinexxxx command at this time it will only plot a solid line even when other pen styles are used. This is a known issue and is on the list of items to be fixed.
    Alex

    Comment


    • #3
      Thank you Alex,

      I am referring to plotting a moving average. Not even this works?

      Mihai
      Mihai Buta

      Comment


      • #4
        Mihai
        Should work fine when plotting a returned value (see enclosed efs and the image below). However it will work only if the thickness is set to 1.
        Alex

        PHP Code:
        var vMA1 null;
        var 
        vMA2 null;
        function 
        preMain() {

            
        setPriceStudy(true);
            
        setStudyTitle("MAx2");
            
        setCursorLabelName("MA1"0);
            
        setCursorLabelName("MA2"1);
            
        setDefaultBarStyle(PS_DOT0);
            
        setDefaultBarStyle(PS_SOLID1);
            
        setDefaultBarFgColor(Color.blue0);
            
        setDefaultBarFgColor(Color.red1);
        }

        function 
        main() {

            if (
        vMA1 == nullvMA1 = new MAStudy(100"Close""MAStudy.SIMPLE");
            if (
        vMA2 == nullvMA2 = new MAStudy(200"Close""MAStudy.SIMPLE");

            if(
        vMA1.getValue(MAStudy.MA)>vMA2.getValue(MAStudy.MA))
            
        setBarStyle(PS_DOT,1)

            return new Array (
        vMA1.getValue(MAStudy.MA),vMA2.getValue(MAStudy.MA));

        Comment


        • #5
          Alex,

          Thank you.
          I made it work non-Ortodox way. I used setDefault function in main, because set did not work. As I have variable output, cannot set it in preMain.

          Thanks again.
          Mihai
          Mihai Buta

          Comment

          Working...
          X