[Archive] Learn how to make money villagers! - page 881

 
Vitava:
Oh yeah, keep using it.

Thanks - I will do so ....
 
Vitava see page 873. Roman has posted the report, owls and settings there.
 
Hi all. Below is a rudimentary snippet of a program that I'm having trouble completing. I want it to check if there is another order at the same place (with the same price) and if there is, I should skip it. Otherwise, it sets orders up to the set limits and then places them after the second or third round. If you set it to automatic, you have to set buy stop and you'll see the result. If anyone is able to finish this, please do not be lazy. When it works - reward sure!!!


extern double Lot=0.01;
extern bool Ustan_BuyStop=true;
extern bool Ustan_SellStop=true;
double Dist=10000.0;
string SMB;
double NewPrice,SL,TP;
int i,z;
int start()
{
RefreshRates();
SMB=Symbol();
if(Ustan_BuyStop || Ustan_SellStop) {UstanOtlozh();}
}
return(0);
void UstanOtlozh()
{
double OldPrice=WindowPriceOnDropped();
RefreshRates();
SMB=Symbol();
{
int i=1;
while(i<=OrdersTotal())
{
if (OrderSelect(i-1,SELECT_BY_POS)==true)
{
if (OrderSymbol()!= SMB) continue;
int Tip=OrderType();
if (Tip<2) continue;
double Price=OrderOpenPrice();
{
NewPrice=Price;
while(NewPrice<=Ask+300*Point||NewPrice>=Ask+20*Po int)
{
NewPrice=NewPrice+20*Point;
SL=NewPrice-20*Point;
TP=NewPrice+20*Point;
OrderSend(SMB,OP_BUYSTOP,Lot,NewPrice,3,SL,TP,NULL,0,CLR_NONE);
if(NewPrice>Ask+300*Point|||NewPrice<Ask+20*Point)
return;
}}
}
}
}
}
 
Melko:
Hi all. Below is a rudimentary snippet of a program that I'm having trouble completing. I want it to check if there is another order at the same place (with the same price) and if there is, I should skip it. Otherwise, it sets orders up to the set limits and then places them after the second or third round. If you set it to automatic, you have to set buy stop and you'll see the result. If anyone is able to finish this, please do not be lazy. When it works - reward sure!!!


extern double Lot=0.01;
extern bool Ustan_BuyStop=true;
extern bool Ustan_SellStop=true;
double Dist=10000.0;
string SMB;
double NewPrice,SL,TP;
int i,z;
int start()
{
RefreshRates();
SMB=Symbol();
if(Ustan_BuyStop || Ustan_SellStop) {UstanOtlozh();}
}
return(0);
void UstanOtlozh()
{
double OldPrice=WindowPriceOnDropped();
RefreshRates();
SMB=Symbol();
{
int i=1;
while(i<=OrdersTotal())
{
if (OrderSelect(i-1,SELECT_BY_POS)==true)
{
if (OrderSymbol()!= SMB) continue;
int Tip=OrderType();
if (Tip<2) continue;
double Price=OrderOpenPrice();
{
NewPrice=Price;
while(NewPrice<=Ask+300*Point||NewPrice>=Ask+20*Po int)
{
NewPrice=NewPrice+20*Point;
SL=NewPrice+20*Point;
TP=NewPrice+20*Point;
OrderSend(SMB,OP_BUYSTOP,Lot,NewPrice,3,SL,TP,NULL,0,CLR_NONE);
if(NewPrice>Ask+300*Point|||NewPrice<Ask+20*Point)
return;
}}
}
}
}
}

Use this function by Kim I.V. Also look here to see if you can pick up anything else...
 
extern double Lot=0.01; <br / translate="no"> extern bool Ustan_BuyStop=true;
extern bool Ustan_SellStop=true;
double Dist=10000.0;
string SMB;
double NewPrice,SL,TP;
int i,z;
int start()
{
RefreshRates();
SMB=Symbol();
if(Ustan_BuyStop || Ustan_SellStop) {UstanOtlozh();}
}
return(0);
void UstanOtlozh()
{
double OldPrice=WindowPriceOnDropped();
RefreshRates();
SMB=Symbol();
{
int i=1;
while(i<=OrdersTotal())
{
if (OrderSelect(i-1,SELECT_BY_POS)==true)
{
if (OrderSymbol()!= SMB) continue;
int Tip=OrderType();
if (Tip<2) continue;
double Price=OrderOpenPrice();
{
NewPrice=Price;
while(NewPrice<=Ask+300*Point||NewPrice>=Ask+20*Po int)
{
NewPrice=NewPrice+20*Point;
SL=NewPrice-20*Point;
TP=NewPrice+20*Point;
OrderSend(SMB,OP_BUYSTOP,Lot,NewPrice,3,SL,TP,NULL,0,CLR_NONE);
if(NewPrice>Ask+300*Point|||NewPrice<Ask+20*Point)
return;
}}
}
}
}
}


} } I've come, I've come, I've come, I've come, I've come, I've come...

First thing I saw was where is the i variable incremented in the while loop? i++

Further, if it does not help, you can look into the code in more detail ;)

 

moskitman:

P.S. Never participate in pyramid schemes!

I looked at the site-think about them or not and immediately realized that it does not roll.

It worked for a very short time, it collapsed :D and the development that everyone said-believed is hilarious)

in ukraine, the omon raided everything and froze all payments.

People believe in such things... I'd rather sit on Forex.)

 

The villagers have all given up.

It's been another winter-every dayat the computer, I'm not young anymore :D Life- time flies so fast, I remember the past so vividly as if I was in school, as if I was 18 not so long ago, shit)

 
7Konstantin7:

The villagers have all given up.

It's been another winter - every dayon the computer, for 4 years

Everything will be all right.
 
joo:
Everything will be fine.
:-)
 

I have a question for you, Konstantin - I attached the Expert Advisor that you called Vse_dlja_sela to my cent account and its settings are not bad, but it just does not trade...

What's the deal with???? Tell me please aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?

Reason: