Coding help - page 728

 
Rajiv:
Please help me mladen. This  attached  EA not closing trades on opposite signal when  HEDGE parameter is true.
"Hedging" on the same symbol as a trading system assumes that the orders of opposite direction are not closed unless the stop loss or take profit is hit. If you change that, it will not be hedging any more. Leave it as is in order to have hedging option and turn the hedge parameter to false if you want the opposite direction orders to be closed on a new signal
 

baraozemo:

Hi Mladen,

 

Here is the "sample-ea-modular.mq5" with some code inside... and with the interface that have the Idea that I want.

I'm trying to make it modular , the idea is to optimize separately in/out of each indicator..

If I can make this with the "sample-ea-modular.mq5" I will change the real EA.

the real base is the Ea-sample.mq5. (i'm posting only to you see all the indicators)

hi mladen,

any tip about modular ?  

 
mladen:
"Hedging" on the same symbol as a trading system assumes that the orders of opposite direction are not closed unless the stop loss or take profit is hit. If you change that, it will not be hedging any more. Leave it as is in order to have hedging option and turn the hedge parameter to false if you want the opposite direction orders to be closed on a new signal
Thank u very much mladen. In my  strategy  , it requires. please modify EA to close trades on opposite signals  when Hedging parameter is true.
 
Rajiv:
Thank u very much mladen. In my  strategy  , it requires. please modify EA to close trades on opposite signals  when Hedging parameter is true.
Please read my post regarding that again.
 
Rajiv:

Buy order.......t p......200pips

                    sl......850pips

 

Hedge sell order....t p...200pips

                            sl ....300pips 

 

In this  case, first hedge  sell order  tp  acheived.Then .Assume that   before either buy order tp or buy order  sl achived , a new sell  signal comes. BUT the EA  not closed previous buy order and open new sell order. THIS MY PROBLEM.

I have nothing to add to my previous message. All needed is explained in it
 
mladen:
Please read my post regarding that again.

Buy order.......t p......200pips

                    sl......850pips

 

Hedge sell order....t p...200pips

                            sl ....300pips 

 

In this  case, first hedge  sell order  tp  acheived.Then .Assume that   before either buy order tp or buy order  sl achived , a new sell  signal comes. BUT the EA  not close previous buy order and open new sell order. THIS MY PROBLEM.

 

Hi friends,

Attached indi has 1 error.

I am very pleased that you will repair it.

Thank you. 

Files:
 
oguz:

Hi friends,

Attached indi has 1 error.

I am very pleased that you will repair it.

Thank you. 

try now.

Files:
 
mntiwana:

try now.

Yep, it's work :)

Thank you my friend.. 

 

HI MR MLADEN

could you add fist color change on histogram

 

first opposite candle color change

similar this picture 

 best regard

Reason: