1 (edited by yonkuro 2018-10-26 22:41:48)

Topic: No New Trades Option (Question)

Hi Popov,

could you please teach us how to add an option (that can be turned on or off) to prevent the Portfolio EA opening new trades, so the EA will only close the remaining open trades?

Best regards.

do or do not there is no try

2 (edited by deadlef 2018-10-27 09:39:50)

Re: No New Trades Option (Question)


try it like this: put into variables this

input bool                 DoNotTrade                   = true;        

Than in void void SetSignals(Signal &signalList[]) do this

   signalList[i++] = GetExitSignal_00();
   signalList[i++] = GetEntrySignal_00();

this you have to put into each of your signals so if the variable is false the ea will not enter any position.

You also can add a button on chart that you can switch between on/off.

Re: No New Trades Option (Question)

Thank you very much deadlef smile

I'll try it.

do or do not there is no try