Results 1 to 4 of 4
 1 Attachment(s)    

Thread: Sleepafterxlosses

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    13

    Default Sleepafterxlosses

    Hi,

    Has anyone used the "sleepafterxlosses" feature which I see in many of the EAs code.

    Has anyone been able to get it to work?

    I noticed the following code:
    bool sleepafterxlosses=false; // ea sleeps after x consecutive losses
    int xlosses=4; // x consecutive losses
    int sleepminutes=60; // sleep minutes

    Is there any other places in the code that needs to be changed to get this working, as I have tried changing the false to true but it still enters positions.

  2. #2
    Junior Member
    Join Date
    Dec 2010
    Posts
    13

    Default

    Funyoo, are you able to help answer this question, or is someone familiar with this. I would like to get this EA to sleep for 15 Minutes after 1 loss. In how many places within the code must I modify as I have tried the following, but it does not wait the 15 minutes before entering a new trade.

    bool sleepafterxlosses=true;
    int xlosses=1;
    int sleepminutes=15;

    Is there anything else or another area within the code that needs to be changed?

    I have attached the EA
    Attached Files Attached Files
    Last edited by tsforex; 08-10-2011 at 01:50.

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    6

    Default

    HI,

    Funyoo do you perhaps have a full code snippet, I also would like to implement this in my ea.
    Or can you name a ea of you where I could see this.
    thanks very much

    *Update: I have inserted your core functions Sleep and Conescutive, also the variables but how can I make the check
    bevore opening order. Now after compile I get error that the
    sleep, checksleep and consecutive are not referenced.....
    Help would be apreciated.
    Last edited by jupp78; 05-29-2012 at 20:47.

  4. #4
    Junior Member
    Join Date
    Sep 2009
    Posts
    6

    Default

    Is there a special paying section to the forum, where funyoo answer such questions?

Tags for this Thread

eas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •