Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, NeoDumont), 761 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: PriNova] #411975
11/21/12 16:13
11/21/12 16:13
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Code:
if(whatever_Condition == TRUE) {
  TimeWait = 1000; 
  for(i = NumOpenShort; i < numShortLevels; i++)
     enterShort(0,priceClose() - i*25*PIP);
}


Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: jcl] #411977
11/21/12 16:31
11/21/12 16:31
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline OP
Junior Member
PriNova  Offline OP
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
you are brillant. i will check this out soon after i post my strange WFO-Report i found again. ;-)

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: PriNova] #411990
11/21/12 19:00
11/21/12 19:00
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline OP
Junior Member
PriNova  Offline OP
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
oh, it doesn't work. sorry to bother you, but it opens more trades then in the numShortLevels defined and the spacing between is random.

here the code i use:

Code:
int numShortLevels = 10;
int numLongLevels = 2;
bool flg = TRUE;
int i;
function run()
{
	StartDate = 2012;
	//set(TICKS);
	if(numShort() == 0 and flg == TRUE)
	{
		enterShort();
		flg = FALSE;
	}
	
		TimeWait = 1000; 
		for(i = NumOpenShort; i < numShortLevels; i++)
		{
			enterShort(0, priceClose() - i*300*PIP);
		}
	 
}



maybe i'm doing something wrong. i think it has something to do with the priceClose() in the enterShort().
it doesnt need the priceClose(), what it needs is the OrderOpenPrice of the last opened order to calculate the spacing, but i don't know how to get this values.
i looked into the trading.h, but didn't get the TRADE struct to work.

Last edited by PriNova; 11/21/12 19:03.
Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: PriNova] #411993
11/21/12 19:54
11/21/12 19:54
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You're right. The price problem can be easily solved, but the more serious problem is that it opens up to 10 new pending trades with different price levels at each bar because it checks only the number of open trades, but not the number of pending trades.

We could cycle through all trades and check how many are pending, but the better solution is just to implement two variables NumPendingShort and NumPendingLong. This will be implemented in the next Zorro update.

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: jcl] #412334
11/26/12 00:44
11/26/12 00:44
Joined: Nov 2012
Posts: 209
S
SFF Offline
Member
SFF  Offline
Member
S

Joined: Nov 2012
Posts: 209
Is it possible in zorro to open or close trades at less than 1min?
For example I enter trade at 14:01:34 and close at 14:32:25.

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: SFF] #412344
11/26/12 08:14
11/26/12 08:14
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, either with a trade function that checks the current time and opens or exits at a certain time, or just with an entry or exit limit. The trade is then opened when the limit condition is met.

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: jcl] #416812
02/05/13 01:12
02/05/13 01:12
Joined: Nov 2012
Posts: 209
S
SFF Offline
Member
SFF  Offline
Member
S

Joined: Nov 2012
Posts: 209
in current Zorro, is it possble to use incomplete bar which in MT4 is [0] index?

And I wanted to use current price which is in it just ASK or BID.
[0] of closeprice seems just only close price as Zorro just not use incomplete bar.

Thanks in advance.

Last edited by SFF; 02/05/13 01:13.
Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: SFF] #416827
02/05/13 10:06
02/05/13 10:06
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes. It's not recommended, but possible of course. There are several ways, for instance with a trade function. Let me know what you want to do with the current price and I'll tell you the best way for this.

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: jcl] #416828
02/05/13 10:08
02/05/13 10:08
Joined: Nov 2012
Posts: 209
S
SFF Offline
Member
SFF  Offline
Member
S

Joined: Nov 2012
Posts: 209
I want to use zigzag indicator for exit and want to see zigzag value in real time.

Re: MT4 vs. Zorro: Questions, Explanations and Comparing [Re: SFF] #416833
02/05/13 10:45
02/05/13 10:45
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Zigzag uses no incomplete candles. Aside from the fact that it repaints and thus can not be used for trade signals, you can implement it like any other indicator.

Page 2 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1