Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,843 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to open LIMIT STOP #461465
08/07/16 12:37
08/07/16 12:37
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

i have this function:

Quote:

int newCycle(){
int i;
var myGrid=10*PIP;
var PriceUP=price()+myGrid*2;
var PriceDN=price()-myGrid*2;
//printf("\nInit: DN:%.5f UP:%.5f",PriceDN,PriceUP);
for(i = 0; i < 10; i ++)
{
PriceUP+=myGrid;
PriceDN-=myGrid;
if (i<2){
//2x LIMIT
-------> This I'm want to open SELL LIMIT and BUY LIMIT
-------> But open in the actual price not pending
enterShort(1,PriceUP);
enterLong(1,PriceDN);
printf("\nMENSI:%d DN:%.5f UP:%.5f",i,PriceDN,PriceUP);
continue;
}
..------> This is OK, Open the Buy and Sell STOP.
enterLong(1,PriceUP);
enterShort(1,PriceDN);
printf("\nVetsi:%d DN:%.5f UP:%.5f",i,PriceDN,PriceUP);

}
}


How to send the LIMIT ORDER?

Thanks

Re: How to open LIMIT STOP [Re: Grat] #461470
08/07/16 23:10
08/07/16 23:10
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
So,

i find solution in the manual:


int newCycle(){
int i;
var myGrid=10*PIP;
var PriceUP=price()+myGrid*2;
var PriceDN=price()-myGrid*2;
for(i = 0; i < 10; i ++)
{
PriceUP+=myGrid;
PriceDN-=myGrid;
if (i<2){
enterShort(1,-PriceUP); // here must is change from PriceUP to -PriceUp
enterLong(1,-PriceDN); // dtto
continue;
}
enterLong(1,PriceUP);
enterShort(1,PriceDN);

}
}


Last edited by Grat; 08/07/16 23:11.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1