Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Openning ONLY one short or long trade at a time #482656
03/13/21 23:53
03/13/21 23:53
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
Hello guys, i am new on this platforme, after searching for days for a software to run walk forward optimization, i finally found this zorro plateforme, the possibilities are just amazing but the documentation (just like any other documentation) is not amazing which is a normal thing be cause it's the users on the forums ho can really spread the techniiques...
i am trying to contribute for the futur users (and for myself) by posting this question :
How can i oppend only one short trade and only one long trade and ignore short signals when a short trade in open and vise versa for long trades ?


if i find a way to do this i will post it, if some one know plz help^^

Re: Openning ONLY one short or long trade at a time [Re: anissyo] #482657
03/14/21 03:04
03/14/21 03:04
Joined: Feb 2017
Posts: 1,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,806
Chicago
MaxLong=1;
MaxShort=1;

Re: Openning ONLY one short or long trade at a time [Re: anissyo] #482659
03/14/21 18:36
03/14/21 18:36
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
thank you Andrew, i used another method but your's is much simpler :


bool Trade_short_state()
{bool bool_short= false;
for(open_trades){
if(TradeIsShort == true){
bool_short= true;}}
return bool_short;
}
bool Trade_long_state()
{bool bool_long= false;
for(open_trades){
if(TradeIsLong == true){
bool_long= true;}}
return bool_long;
}



if the function return true then a trade is already in place if not i can open the trade
thank you.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1