Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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