Gamestudio Links
Zorro Links
Newest Posts
hello all
by jcl. 09/24/19 09:04
Right AssetsFix for trading Forex on IG?
by Andy60. 09/23/19 21:11
Converting fbx file to mdl7
by Dark_Light. 09/23/19 15:50
New system for Zorro S subscriptions
by jcl. 09/23/19 08:34
IG plugin initial release
by Andy60. 09/23/19 07:40
Any chance of PBR materials with A8?
by Dooley. 09/22/19 21:43
Levels, textures, etc for A8
by Dooley. 09/22/19 03:57
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 Now
8 registered members (svenbob, Tamas, MatPed, Superku, kvm, jenGs, 3run, 1 invisible), 642 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Zylo, Hjuutgckk, Dark_Light, oxygenjoe, web20tpo
18292 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
exitTrade causes for(current_trades) not being cycled #475497
12/15/18 21:50
12/15/18 21:50
Joined: Oct 2018
Posts: 71
S
SnoopySniff Offline OP
Junior Member
SnoopySniff  Offline OP
Junior Member
S

Joined: Oct 2018
Posts: 71
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)...

Last edited by SnoopySniff; 12/15/18 22:34.
Re: exitTrade causes for(current_trades) not being cycled [Re: SnoopySniff] #475498
12/15/18 21:59
12/15/18 21:59
Joined: Feb 2017
Posts: 754
Chicago
AndrewAMD Offline
User
AndrewAMD  Offline
User

Joined: Feb 2017
Posts: 754
Chicago
Post script.

Re: exitTrade causes for(current_trades) not being cycled [Re: AndrewAMD] #475501
12/15/18 23:27
12/15/18 23:27
Joined: Oct 2018
Posts: 71
S
SnoopySniff Offline OP
Junior Member
SnoopySniff  Offline OP
Junior Member
S

Joined: Oct 2018
Posts: 71
I just found the problem. I was using a for cycle in a for cycle which is not allowed. Thank you!

Re: exitTrade causes for(current_trades) not being cycled [Re: SnoopySniff] #477050
05/06/19 19:45
05/06/19 19:45
Joined: May 2019
Posts: 10
S
sarmasboy Offline
Newbie
sarmasboy  Offline
Newbie
S

Joined: May 2019
Posts: 10
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

Last edited by sarmasboy; 05/06/19 19:46.
Re: exitTrade causes for(current_trades) not being cycled [Re: sarmasboy] #477053
05/08/19 09:00
05/08/19 09:00
Joined: Jul 2000
Posts: 27,010
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,010
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.


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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1