Announcement

Collapse
No announcement yet.

Having trouble getting two T3MAs

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

  • Having trouble getting two T3MAs

    Alex,

    when I try to use two T3MAs; applying the second MA just re-adjusts the one that is currently on the symbol. Does this have anything to do with the Library?

    Thanks

  • #2
    JJOM
    I don't think it does. I just tried loading 3 instances of the amT3MA.efs and they appear to be working fine.
    I also tried using multiple instances of the amT3() function in the same efs (code enclosed below) and also that appears to be working without problems (see chart showing all 5 instances of the T3MA)
    Alex

    PHP Code:
    function preMain(){
        
    setPriceStudy(true);
    }

    var 
    amLib addLibrary("amStudies.efsLib");
    var 
    T3_1 null;
    var 
    T3_2 null;

    function 
    main(Length1Length2){

        if(
    Length1==nullLength1 10;
        if(
    Length2==nullLength2 20;
        
        if(
    T3_1==nullT3_1 amLib.amT3(Length1,0.7);
        if(
    T3_2==nullT3_2 amLib.amT3(Length2,0.7);
        
        return new Array(
    T3_1.getValue(0),T3_2.getValue(0));

    Comment

    Working...
    X