Announcement

Collapse
No announcement yet.

TRIX Indicator for ESignal

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

  • TRIX Indicator for ESignal

    Greetings,

    Thought perhaps someone could use this; appologies if someone has already posted this:

    This is a 6 period TRIX study.

    PHP Code:

    var StudyEMA1 = new MAStudy(60"close"MAStudy.EXPONENTIAL);
    var 
    StudyEMA2 = new MAStudy(60StudyEMA1MAStudy.MAMAStudy.EXPONENTIAL);
    var 
    StudyEMA3 = new MAStudy(60StudyEMA2MAStudy.MAMAStudy.EXPONENTIAL);
    var 
    prev_ema3 null;
    var 
    trix null;

    function 
    preMain()
    {
        
    setPriceStudy(true);
        
    setDefaultBarThickness(10);
        
    setCursorLabelName("Trix 6"0);
        
    setDefaultBarFgColor(Color.red0);
    }

    function 
    main()
    {       
        if (
    getBarState() == BARSTATE_NEWBAR)
        {
            
    ema1 StudyEMA1.getValue(MAStudy.MA);
            
    ema2 StudyEMA2.getValue(MAStudy.MA);
            
    ema3 StudyEMA3.getValue(MAStudy.MA);
            
            if (
    prev_ema3 != null)
                
    trix ema3 prev_ema3 prev_ema3;
            
            
    prev_ema3 ema3;
            
        }
        
        if (
    trix != null)
            return 
    trix;
        

    Cheers,
    Joshua C. Bergeron
Working...
X