Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (EW_bytes, Martin_HH, 1 invisible), 13,180 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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