Gamestudio Links
Zorro Links
Newest Posts
Specular Shader
by Dooley
Yesterday at 18:17
is 3dgs byDirextX or Opengl?
by Dooley
Yesterday at 18:09
Tensorflow and Python 32 bit
by jcl
Yesterday at 13:28
New Zorro version 2.12
by jcl
05/21/19 17:23
Mixed frequency history (M1+D)
by jcl
05/20/19 12:21
This is my fault-tolerant ATR indicator for you
by OptimusPrime
05/18/19 16:35
missing trade variables
by AndrewAMD
05/18/19 12:37
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online
5 registered (kvm, Michael_Schwarz, Ayumi, Dooley, 1 invisible), 519 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Newest Members
Reza65, Pritamchakra, h4h4rd, ccm, Pippo
18224 Registered Users
Topic Options
Rate This Topic
#475497 - 12/15/18 22:50 exitTrade causes for(current_trades) not being cycled
SnoopySniff Offline
Newbie

Registered: 10/04/18
Posts: 45
I am cycling through open trades with for(current_trades) and do some stuff in it.

Then later I am closing specific trades with exitTrade(ThisTrade) in an other for(last_trades) cycle.

After that exitTrade procedure the for(current_trades) is not entered anymore, even there is at least one trade open.

I can't find a solution. Could it be a bug? Any help is appreciated.

PS: Same problem with for(open_trades)...


Edited by SnoopySniff (12/15/18 23:34)

Top
#475498 - 12/15/18 22:59 Re: exitTrade causes for(current_trades) not being cycled [Re: SnoopySniff]
AndrewAMD Offline
User

Registered: 02/21/17
Posts: 652
Loc: Chicago
Post script.

Top
#475501 - 12/16/18 00:27 Re: exitTrade causes for(current_trades) not being cycled [Re: AndrewAMD]
SnoopySniff Offline
Newbie

Registered: 10/04/18
Posts: 45
I just found the problem. I was using a for cycle in a for cycle which is not allowed. Thank you!

Top
#477050 - 05/06/19 21:45 Re: exitTrade causes for(current_trades) not being cycled [Re: SnoopySniff]
sarmasboy Offline
Guest

Registered: 05/06/19
Posts: 2
Hey all, I'm having the same issue frown I checked and mine doesn't have any additional for loops. Here's a snippet of my code:

Code:
if(...) {
  ...
} else if(...) {
  for(open_trades) {
    printf("Entry Limit 1: %.5f", (var)TradeEntryLimit);
    if(TradeIsPending) exitTrade(ThisTrade);
  }
}



It stops after finding the first pending order. I have the printf() to figure out which one is not closing. Any other ideas why it's not working?

Laurynas


Edited by sarmasboy (05/06/19 21:46)

Top
#477053 - 05/08/19 11:00 Re: exitTrade causes for(current_trades) not being cycled [Re: sarmasboy]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26869
Loc: Frankfurt
The code looks ok, so it should not stop, unless the closed trade was the only one. If you can't find the reason, you can contact Support with the script. They'll look into it. Maybe it is something that depends on other settings in the script.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de