Author Topic: Parallel execution?  (Read 2999 times)

Tags:
  • All members
  • Posts: 1
  • Karma: +0/-0
Parallel execution?
« on: Fri, 23 April, 2010, 19:12 »
Is it possible to trigger a call only once? When such a value changes (eg last_pl) and I want to add it to another variable, is added to many times as the markets are monitored.

zax

  • Élite
  • Posts: 215
  • Karma: +4/-0
*
Re: Parallel execution?
« Reply #1 on: Mon, 26 April, 2010, 09:59 »
Is it possible to trigger a call only once? When such a value changes (eg last_pl) and I want to add it to another variable, is added to many times as the markets are monitored.

zax

If you want to add a trigger variable just once, you can use triggers Execute property.

If you want to add a trigger variable every time it has a new contents, you need 3 additional triggers and 1 variable which stores the last added value.

  • Administrator
  • Posts: 8952
  • Karma: +337/-2
  • Gender: Female
*
Re: Parallel execution?
« Reply #2 on: Thu, 29 April, 2010, 12:50 »
Also, don't forget to untick "Individually for each market".

Martin is right, if you want to add this value only after it has changed, you should do something like in the file I'm attaching.

The idea behind this is to only add last P/L if the account history has changed. The variable hist_count returns the number of entries in the statement, so if its value is equal to the value it had in the previous markets, it means you don't need to add last P/L.
Hope it helps.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Usuários brasileiros, bem vindos ao nosso WhatsApp chat!

Присоединяйтесь к нашей официальной группе ВКонтакте!