Announcement

Collapse
No announcement yet.

EPREM A0 versus $PREM problems w/my EFS

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

  • EPREM A0 versus $PREM problems w/my EFS

    I have a little EFS script I wrote that gives an audible alert when the high/low of the current bar goes above/below a set threshold (variables: vPREMbuy and vPREMsell). It works flawlessly for $PREM on a 1min chart. However, when I use the symbol EPREM A0 instead, it does not trigger at all, desite the prices obviously crashing the trigger levels.

    Why is this happening?... is there a way around this?

    The basic main code is like this (very simple):

    if (getBarState() == BARSTATE_NEWBAR) {
    bAlert = false; }

    if (high(0) >= vPREMbuy && bAlert==false) {
    bAlert = true;
    Alert.playSound(WaveFilePREMbuy); // Play the BUY audible
    }
    else if (low() <=vPREMsell && bAlert==false) {
    bAlert = true;
    Alert.playSound(WaveFilePREMsell); // Play the SELL audible
    }
    Last edited by fish7; 12-09-2005, 02:14 PM.

  • #2
    fish7
    That is because the two symbols are in different price ranges.
    For example 800 with $PREM (or $EPREM) is equivalent to 8.00 in EPREM A0.
    To verify this insert an addBand(vPREMbuy, PS_SOLID ,2 ,Color.red ,"vPREMbuy"); in the EPREM A0 chart and see where it draws
    Alex

    Comment


    • #3
      fish7
      To make the efs work indifferently with either symbol you could just add the following to your script
      Alex

      PHP Code:
      if(getSymbol()=="EPREM A0"){
          
      vPREMbuy vPREMbuy/100;
          
      vPREMsell vPREMsell/100;

      Comment


      • #4
        thnx

        Alex,

        Thanks for your reply... that fixed it.

        What threw me is that the Y-axis is the same for $PREM as it is for EPREM A0 ... despite the fact that the data for the two is different by a factor of 100.

        THnx again!

        JOHN

        Comment

        Working...
        X