Macd Zero line Bot

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #68185 quote
    bezieh
    Participant
    Average

    Hey guys, when i try to use the macd zero line as automatic trading, it doesn’t work.

    I tried the code nicolas posted, but it doesn’t work? I when i press “creation by programming”, i remove the text already there, and copied in this:

     

    EMAshort1 = exponentialaverage[short](close)
    EMAshort2 = exponentialaverage[short](EMAshort1)
    DifferenceShort = EMAshort1 - EMAshort2
    ZeroLagShort = EMAshort1 + DifferenceShort
    
    EMAlong1 = exponentialaverage[long](close)
    EMAlong2 = exponentialaverage[long](EMAlong1)
    DifferenceLong = EMAlong1 - EMAlong2
    ZeroLagLong = EMAlong1 + DifferenceLong
    
    ZeroLagMACD = ZeroLagShort - ZeroLagLong
    
    signal1=ExponentialAverage[signal](ZEROLAGMACD)
    signal2=ExponentialAverage[signal](signal1)
    DIFFERENCE2=signal1-signal2
    
    SignalMACD=signal1+DIFFERENCE2
    
    RETURN ZeroLagMACD as "Zero Lag MACD", SignalMACD as "Signal MACD"

     

     

    And it doesn’t work.

    What am i doing wrong? Appreciate all help guys!

    Thanks

    #68186 quote
    GraHal
    Participant
    Master

    I guess you have seen this?  …

    Surely such a basic Indicator as the MACD can’t be wrong in the standard PRT listings???

    #68239 quote
    jebus89
    Participant
    Master

    First of all, the INDICATOR that youre trying to implement is missing 3 values: short, long and signal.

    you need to define the values for that indicator, like this:

    short = 10
    long = 20
    signal = 15
    
    EMAshort1 = exponentialaverage[short](close)
    EMAshort2 = exponentialaverage[short](EMAshort1)
    DifferenceShort = EMAshort1 - EMAshort2
    ZeroLagShort = EMAshort1 + DifferenceShort
    
    EMAlong1 = exponentialaverage[long](close)
    EMAlong2 = exponentialaverage[long](EMAlong1)
    DifferenceLong = EMAlong1 - EMAlong2
    ZeroLagLong = EMAlong1 + DifferenceLong
    
    ZeroLagMACD = ZeroLagShort - ZeroLagLong
    
    signal1=ExponentialAverage[signal](ZEROLAGMACD)
    signal2=ExponentialAverage[signal](signal1)
    DIFFERENCE2=signal1-signal2
    
    SignalMACD=signal1+DIFFERENCE2
    
    RETURN ZeroLagMACD as "Zero Lag MACD", SignalMACD as "Signal MACD"

    I just used random values for the values, i dont know what values to use here 🙂 Now that you have the indicator, you add a new indicator to the chart and voila, you can use the creation wizard tool to click the indicator and do what you need to do

    #112307 quote
    RAAAMMY
    Participant
    Average

    Hi Bezieh, Are you still using the macd zero line as automatic trading?

    I am interested in using this myself.

    All the best

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Macd Zero line Bot


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
bezieh @bezieh Participant
Summary

This topic contains 3 replies,
has 4 voices, and was last updated by RAAAMMY
6 years, 4 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 04/12/2018
Status: Active
Attachments: No files
Logo Logo
Loading...