Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,377 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 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,731
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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