Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,266 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,729
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,729
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