Announcement

Collapse
No announcement yet.

newby at efs needs help

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

  • newby at efs needs help

    I am trying to write a color bar study that will change the colors depending on 2 conditions.
    First,
    if 10 ema > 30 wma and MACD 19, 39 > 9 ema of MACD 19,39; set PriceBarColor(color.lime)

    second,
    if 10 ema < 30 wma and MACD 19, 39 < 9 ema of MACD 19, 39; setPriceBarColor(color.red)

    I know how to write it for tradestation, but efs escapes me so far.....thanks

    Jose Alemany

  • #2
    Correct me if I am wrong, but isnt the 9ema of the macd the signal line?

    Comment


    • #3


      might be it, not sure, check it out newbie

      Comment


      • #4
        vMACD19_39.getValue(MACDStudy.MACD) > vMACD19_39.getValue(MACDStudy.SIGNAL)

        needs to be edited as shown above, change the LT sign to GT

        Comment


        • #5
          Jose
          Attached is an efs that should do what you want.
          Alex
          PS. If you also want the MACD based on EMA then change true to false in Line 12 of the formula
          Attached Files
          Last edited by ACM; 02-10-2003, 08:23 PM.

          Comment


          • #6
            We need to get Dion to add

            setColorPriceBars(true);

            whent he PriceColorBars is invoked so dummies like me dont keep forgetting it.

            Comment


            • #7
              wow...fast response. thanks

              I'll check out the formuls posted. thanks everyone.

              Jose

              Comment


              • #8
                Alex, was that done with the wizard?

                If so, I will have to try harder:-) thanks works well

                Jose

                Comment


                • #9
                  Jose
                  Yes it was done using the Formula Wizard.
                  Attached is a zip file with two images one for each set of conditions.
                  As of now the Formula Wizard does not add one command that will make the efs work properly.
                  This command is
                  setColorPriceBars(true);
                  which needs to be added to the preMain() section using the Editor.
                  Alex
                  Attached Files

                  Comment

                  Working...
                  X