enable/disable EA after reaching Marge Niveau? Script?

 

Hello,

Is there a script that put my EA off or on after reaching a specified margin niveau?

Thanks

 
Schaffie:

Is there a script that put my EA off or on after reaching a specified margin level (niveau)?

No, not really. It is difficult to turn an EA ON or OFF. But the EA can turn itself off. Just set a bool flag which is tested as the first item after start()

int start(){
     if( turnedOFF )
        return( 0 );
}
 

Maybe with an indicator that place a certain object at certain conditions that when the EA is finding that object it is not allowed to work the process

and if it is not finding that object it is allowed to do its job.... Something like that can work according to me

 
deVries:

Maybe with an indicator that place a certain object at certain conditions that when the EA is finding that object it is not allowed to work the process

and if it is not finding that object it is allowed to do its job.... Something like that can work according to me

Agreed. You could draw an object called "stopTheEA" and then

int start(){
    if( ObjectFind("stopTheEA") > -1 )
        return( 0 );
}

which is not a lot different to the bool abort flag ... except that it is controlled by an external script or indicator.

Reason: