Download MetaTrader 5

(REQUEST) Some one can make CLOSE PENDING ORDER IN THE CLOSE OF THE CANDLE.

To add comments, please log in or register
Darknesstrader
7
Darknesstrader  

Some one can help me with this ? I want close the pending order when the candle close.

I would like to close the pending orders of this EA when :
Close buy: Bid<Low[1] and The actual candle closes;
and
Close sell: Bid>High[1] and The actual candle closes;‌

-----------------------------------------------------------------------------------------------------------

This is the current EA code for close orders.:
if((Bid<Low[1])||(Bid==Close[0])) //here is your close buy rule/ LINE 89
if((Bid>High[1])||(Bid==Close[0])) // here is your close sell rule/ LINE 107

I want change the BID==CLOSE(0) for Any code that Close the pending order when the candle close.

Thank you guys for help me with this! ‌

Files:
whroeder1
16286
whroeder1  
Darknesstrader:

I want close the pending order when the candle close.

I want change the BID==CLOSE(0) for Any code that Close the pending order when the candle close.

//   Copyright ©2011, ForexEAdvisor.com
// ForexEAdvisor Strategy Builder version 0.2
  1. So where is your new bar code? Where is your OrderSelect loop to find if there is still a pending order? Where do you delete the pending order? (Pending orders can not be closed.)
  2. Bid==Close will almost never be true. The == operand. - MQL4 forum
    • We hate EA builder
    • You couldn't be bothered to learn mql4, therefor there is no common language for us to communicate.
    • There are only two choices: learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem, but we are not going to debug your hundreds lines of code.
    • EA builder makes bad code counting up while closing multiple orders.
    • EA builder makes bad code Bars is unreliable (max bars on chart) volume is unreliable (miss ticks) Always use time. New candle - MQL4 forum
    • EA builder makes bad code Not adjusting for 4/5 digit brokers, TP/SL and slippage:
      double  pip        = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
      int      slippage  = 3 * int(pip / _Point);
    • EA builder makes bad code not adjusting for ECN brokers.
    • EA builder makes bad code not checking return codes.
    • EATree uses objects on chart to save values - not persistent storage (files or GV+Flush.) No recovery (crash/reboot.)

To add comments, please log in or register