Announcement

Collapse
No announcement yet.

How to stop and EFS if condition met?

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

  • How to stop and EFS if condition met?

    Hello,

    How should I proceed to stop an EFS of further execution?

    Specifically if a certain amount of P&L is met, further execution of the EFS should end.
    Also if an indicator has given a number of consecutive losses, is there a way to stop the EFS from executing further for a certain period of time?

    Thank you in advance.

    Cheers.

    Andrei

  • #2
    Solution..

    This solution is resolved by placing your EFSs main functions (actions) within a "conditional IF" statement. You will probably have to track the P&L yourself (within your code) and then deploy the following conditional IF statement within your "main()" function.

    PHP Code:
    var UserDefinedPL 5.5;

    function 
    main()
    {

      
    //  track P&L outside the conditional IF
      
    ..  track P&L here

      
    if (vPL UserDefinedPL) {
       
    //  allow for continued actions

        
    within this areayou'll have your trade entry conditions, exit conditions, stops and profit targets.  Basically everything your system needs to accomplish is in HERE.


      } else {
        //  this is where your system has JUST REACHED it'
    s PL requirements..  You'll need to place EXIT conditions and code here.  For example, your system just reached above the 5.5 PL limit, what do you want it to do IF IT IS CURRENTLY IN A TRADE??

    Probably EXIT and be done for the day.
      }

    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thank you very much again. I understood the logic of it...

      Cheers.

      Andrei

      Comment

      Working...
      X