2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Chief Engineer
|
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
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: PriNova]
#411990
11/21/12 19:00
11/21/12 19:00
|
Joined: Sep 2012
Posts: 74 Niedersachsen, Germany
PriNova
OP
Junior Member
|
OP
Junior Member
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:
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: jcl]
#416812
02/05/13 01:12
02/05/13 01:12
|
Joined: Nov 2012
Posts: 209
SFF
Member
|
Member
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.
|
|
|
|