Announcement

Collapse
No announcement yet.

Two MA's

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

  • Two MA's

    If I wrote this correctly, syncronization between the MA's and the 5 min chart seems off a bit.



    PHP Code:
    function preMain(){
     
    setPriceStudy(true);
     
    setShowTitleParameters(false);
     
    setStudyTitle("two MA's");
     
    setShowCursorLabel(true);
     
    setCursorLabelName("250V"0);
     
    setCursorLabelName("150T"1);
     
    setDefaultBarFgColor(Color.blue0);
     
    setDefaultBarFgColor(Color.red1);
     
    setDefaultBarThickness(2,0);
     
    setDefaultBarThickness(2,1);
    }
    var 
    ma250V 0;
    var 
    ma150T 0;
    function 
    main(){
     if (
    getBarState() == BARSTATE_ALLBARS) {//true once during initial load and subsequent reload
      
    ma250V ema(2inv("250V"));
      
    ma150T ema(2inv("150T"));
     }

    return new Array(
    ma250V.getValue(0), ma150T.getValue(0));

    I also tried it by setting
    ma250V = ema(2, sym("ES #F,250V"));
    ma150T = ema(2, sym("ES #F,150T"));

  • #2
    Hi Steve,

    Hm yeah that does look a little odd. Could you try this with Build 697 (in the EFS2 Internal fileshare). I believe I fixed a few things in there.

    Comment


    • #3
      Hey Steve. Just fixed this bug tonight, thanks for the report. It will appear in Build 698.

      Thanks!

      Comment


      • #4
        Hi Dion,

        You are most welcome.

        Regards,

        Comment

        Working...
        X