Announcement

Collapse
No announcement yet.

Help request for an alert code

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

  • Help request for an alert code

    Hi,
    Could anyone please provide me with a code to trigger an alert when the value of the two angles (vAngle1/vAngle2) of the rays representing Supply/Demand in the Supply/Demand.efs developed by Alex, are both equal to zero.
    Thanks in advance,
    Nicholas
    Attached Files

  • #2
    Nicholas
    The efs you attached includes parts of code that are not in my original script (available in this thread). It would be helpful to always comment changes as suggested at the top of the script.
    Anyhow leave line 34 as is and replace lines 114 to 127 with the code enclosed in the php box below
    FWIW I doubt there will be any instances of both angles measuring 0 at the same time (other than on the first bar of the day). If you want to trigger the alert when either one of the angles measures 0 then replace
    if(vAngle1 == 0 && vAngle2 == 0){
    with
    if(vAngle1 == 0 || vAngle2 == 0){
    Alex


    PHP Code:
    if(vAngle1 == && vAngle2 == 0){
            
    vFlag 0;
        }else{
            
    vFlag 1;
        }
        
        if(
    vFlag==0){
            
    Alert.playSound("ding.wav");
            
    Alert.addToList(getSymbol()+" "+close(), "Buy Alert"Color.blackColor.red);
            
    vFlag 1;
        } 

    Comment

    Working...
    X