Gamestudio Links
Zorro Links
Newest Posts
Black Book, 4th edition
by jcl. 03/17/26 09:28
Trying to get started...
by Lukudo. 03/16/26 09:08
ZorroGPT
by TipmyPip. 03/08/26 18:50
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (AndrewAMD, Volkovstudio, alibaba, TipmyPip), 4,605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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