Announcement

Collapse
No announcement yet.

GetXTLStudy.XTL Not working in 11

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GetXTLStudy.XTL Not working in 11

    Hi,

    I am hoping someone can confirm this maybe a bug. I have a very simple EFS that plays a sound when the XTL state of a chart changes from Neutral, Blue, Red etc.

    Using GetXTLStudy.XTL

    0 = red
    1 = blue
    2 = neutral

    0 is not returning anything. so the EFS never sees anything go XTL Red. This works fine in 10.x

  • #2
    Re: GetXTLStudy.XTL Not working in 11

    lawsb
    That is a bug and I have already reported it to eSignal. The function is returning null instead of 0 when the XTL is red.
    While waiting for a fix you could modify your condition to check for a null and it should work
    Alex


    Originally posted by lawsb
    Hi,

    I am hoping someone can confirm this maybe a bug. I have a very simple EFS that plays a sound when the XTL state of a chart changes from Neutral, Blue, Red etc.

    Using GetXTLStudy.XTL

    0 = red
    1 = blue
    2 = neutral

    0 is not returning anything. so the EFS never sees anything go XTL Red. This works fine in 10.x

    Comment


    • #3
      Alex, thanks!

      would this work?

      function main(Length){

      if (xtl == null) xtl = new GetXTLStudy(Length);

      if(xtl.getValue(GetXTLStudy.XTL)==1 && xtl.getValue(GetXTLStudy.XTL,-1)==0 ||
      xtl.getValue(GetXTLStudy.XTL)==1 && xtl.getValue(GetXTLStudy.XTL,-1)==2){
      Alert.playSound("XTLESB.wav");
      Alert.addToList(getSymbol()+" "+getInterval(),"ES XTL Blue",Color.black,Color.blue);
      }
      if(xtl.getValue(GetXTLStudy.XTL)==null && xtl.getValue(GetXTLStudy.XTL,-1)==1 ||
      xtl.getValue(GetXTLStudy.XTL)==null && xtl.getValue(GetXTLStudy.XTL,-1)==2){
      Alert.playSound("XTLESS.wav");
      Alert.addToList(getSymbol()+" "+getInterval(),"ES XTL Red",Color.black,Color.red);
      }

      return;

      Comment


      • #4
        lawsb
        Not entirely. In your first condition you are still checking for the XTL at the prior bar to be equal to 0 instead of null
        Once you make that correction it should work
        Alex


        Originally posted by lawsb
        Alex, thanks!

        would this work?

        function main(Length){

        if (xtl == null) xtl = new GetXTLStudy(Length);

        if(xtl.getValue(GetXTLStudy.XTL)==1 && xtl.getValue(GetXTLStudy.XTL,-1)==0 ||
        xtl.getValue(GetXTLStudy.XTL)==1 && xtl.getValue(GetXTLStudy.XTL,-1)==2){
        Alert.playSound("XTLESB.wav");
        Alert.addToList(getSymbol()+" "+getInterval(),"ES XTL Blue",Color.black,Color.blue);
        }
        if(xtl.getValue(GetXTLStudy.XTL)==null && xtl.getValue(GetXTLStudy.XTL,-1)==1 ||
        xtl.getValue(GetXTLStudy.XTL)==null && xtl.getValue(GetXTLStudy.XTL,-1)==2){
        Alert.playSound("XTLESS.wav");
        Alert.addToList(getSymbol()+" "+getInterval(),"ES XTL Red",Color.black,Color.red);
        }

        return;

        Comment


        • #5
          thank you Alex

          Comment


          • #6
            lawsb
            You are welcome
            Alex


            Originally posted by lawsb
            thank you Alex

            Comment

            Working...
            X