Announcement

Collapse
No announcement yet.

MACD -EMA Crossover Alert

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

  • MACD -EMA Crossover Alert

    Hallo

    I have used the SHIFT key to drag a MACD study onto the price pane.I also added a EMA to the price pane. What I want now is to get UP and DOWN arrows on the price pane whenever these to indicators cross.

    I constructed arrows for a MACD crossover on the price pane which works just fine.

    I constructed code using the Wizard in the same way to construct code to show arrows for my MACD-EMAcrossover but my arrows do not show.

    Can somebody please advise me what I did wrong, I attach my code for inspection. Or is the problem the MACD in my price pane?

    I would appreciate advise on this.

    Thank you in advance

    Kobus
    Attached Files

  • #2
    Kobus
    Although you may have the impression that the plot of the EMA crosses that of the MACD when you overlay the latter on the price pane they are actually in completely different price ranges and never cross which is why you will not get any arrows drawn.
    To see what I am referring to modify the efs you posted to return both the MACD and the EMA. To do this open the efs with the Editor and in line 51 replace
    return null;
    with
    return new Array (vMACD8_13.getValue(MACDStudy.MACD), vEMA34.getValue(MAStudy.MA));
    Save the efs and reload it on the chart.
    Alex

    Comment


    • #3
      Alexis

      Thank you very much for the reply, I thought that might be a possibility but was not sure.

      I found a tread on which you did a lot of work under NEW STUDY SUGGESTIONS - Custom Indicator Alerts. I posted a question on ADX alerts there to keep the information concerning the ADX alerts together. Would you please be so kind as to have a look at it or if it is more convenient for you I can repost the question in this section.

      Your advise will be appreciated

      Regards

      Kobus

      Comment

      Working...
      X