Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Imhotep), 567 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Pause Trading - how to #475949
01/15/19 09:34
01/15/19 09:34
Joined: Apr 2018
Posts: 46
M
MINER Offline OP
Newbie
MINER  Offline OP
Newbie
M

Joined: Apr 2018
Posts: 46
Hello Community..

I would like to add a condition to my script which will be commanding Zorro to wait for lets say 2 bars after exiting a trade and then check if conditions are true again and enter another trade....which function is best suited for this?

Thank in advance, MINER.

Re: Pause Trading - how to [Re: MINER] #475950
01/15/19 10:10
01/15/19 10:10
Joined: Apr 2018
Posts: 46
M
MINER Offline OP
Newbie
MINER  Offline OP
Newbie
M

Joined: Apr 2018
Posts: 46
I have included trade LifeTime = 4,
I would like zorro to pause after 4th bar and check conditions again in the 6th bar for example. so i would like zorro to pause trading for two bars.

Re: Pause Trading - how to [Re: MINER] #475951
01/15/19 12:05
01/15/19 12:05
Joined: Apr 2018
Posts: 46
M
MINER Offline OP
Newbie
MINER  Offline OP
Newbie
M

Joined: Apr 2018
Posts: 46
Im wondering if its possible to set a delay timer between trades? I'm working on automating a strategy, but there are some times when conditions are met that trades will open and close faster then you can blink. I'm wondering if we can say "For the next 10 bars, do not open any new trades", or "For the next 60 minutes do not open any new trades"

Re: Pause Trading - how to [Re: MINER] #475989
01/16/19 16:39
01/16/19 16:39
Joined: Aug 2018
Posts: 98
O
OptimusPrime Offline
Junior Member
OptimusPrime  Offline
Junior Member
O

Joined: Aug 2018
Posts: 98
Here are some examples from the Manual you can adapt

//Delay every 30 seconds
for(OrderDelay = 0; OrderDelay< 10*30; OrderDelay += 30)
{
//////
}


/////////

// Use an entry limit and an entry delay for not entering trades at the same time
// Call this function before entering a trade
/////////
void setDelay(var Seconds)
{
static int PrevBar = 0;
static var Delay = 0;

if(Bar != PrevBar) { // reset delay at any new bar
Delay = 0;
PrevBar = Bar;
}
Delay += Seconds; // increase delay within the bar
OrderDelay = Delay;
Entry = -0.2*PIP * sqrt(Delay); // entry limit for additional profit


Thanks so much,

OptimusPrime

Re: Pause Trading - how to [Re: OptimusPrime] #476006
01/17/19 11:04
01/17/19 11:04
Joined: Apr 2018
Posts: 46
M
MINER Offline OP
Newbie
MINER  Offline OP
Newbie
M

Joined: Apr 2018
Posts: 46
this is very useful to me Optimus, thank you


Moderated by  Petra 

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