Log in

A great idea from Gary.

   //- A great idea from Gary.
   //~ A simpler way to control these runaway trades is to enter only on a state change instead of a state.

   //~ E.g. if you say "buy if I'm currently flat and bid > X," that opens the trade OK.  But if some condition causes your EA to close it and bid is still > X, boom it's going to buy again.  And sell again and buy again and sell again and ...

   //~ "bid > X" is a state.  It's true for a long time.  You probably want to enter only when that state CHANGES from <= X to >X.

   //~ So if instead you say something like "buy if I'm currently flat, and bid > X, and the LAST bid was <= X" -- then that only happens when the condition is first satisfied.  When your exit code closes the trade, it doesn't open it again.

Comments

  • Jack1 4507 days ago

    But, when state change is missed by EA, or when state change happen, your EA did not get that buy signal, then, you may miss out this a trade in this cycle, no entry, and waiting for next cycle.

  • jaguar1637 4507 days ago

    yes, of course

    I hope the logic (checksignals() function) to work properly and able to detect all break outs