Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 626

 
Jequile:

Greetings all.

I have an Expert Advisor. it places a network of orders in both directions. due to the fact that pending orders are subject to a pledge on eci accounts, the idea of pending needs to be implemented inside the program while maintaining profitability. the way I did it. I added a condition in the order placing condition that the price was close to the intended pending order and there was a subroutine to delete pending orders from which the price moved far away. in fact there was a skip in orders about one and a drop in profitability in the tester.

The 2nd issue - how to measure the price movement speed on ticks or per minute. I was saving the price value at the beginning of each minute and compared it with the previous one, but it didn't work.

Throw me some bright ideas)


This is nonsense! Change your broker!
 

I've got it all figured out, it's a funny thing. maybe I misunderstood when tech support was talking about the pauses. no questions yet.

 

Is it possible to sort orders in the terminal by two parameters, i.e. sort them first by type, and then sort the sorted orders by profit?

If you want to add this functionality to the client in future updates, would it be useful, and does the mt platform allow to do this?

 

Can you tell me why the screen shows me 4 characters after the decimal point and not 5?

The bill has 5 characters after the decimal point.

double Ask_price;
double Bid_price;

double Spread_price;



int start()
{

Spread_price=MarketInfo (Symbol(),MODE_SPREAD);
Ask_price=MarketInfo(Symbol(),MODE_ASK);
Bid_price=MarketInfo(Symbol(),MODE_BID);



Comment(Spread_price,"      ",Ask_price,"      ",Bid_price);

return(0);
}

 
culler:

Can you tell me why the screen shows me 4 characters after the decimal point and not 5?

The bill has 5 characters after the decimal point.


And so

Comment(Spread_price,"      ",DoubleToString(Ask_price,5),"      ",DoubleToString(Bid_price,5));

adding DoubleToString

 

Guys, what's the problem? I don't know what's wrong...

enum OrderType {
   Buy = OP_BUY
}
class Order
{
public:
   Order(OrderType orderType);
   Order(int ticket);
   Order();
   //...
}

//где-то в коде
OrderType orderType = OrderType::Buy;
Order order(orderType);   // <------- ругается компилятор: 'Order' - ambiguous call to overloaded function with the same parameters
If I remove orderType or replace it with a number, everything compiles fine.How can there be an "ambiguous call"?








 
r772ra:


And so

add DoubleToString


Thanks.

I use Comment for control, to see what the value is in the cells.

And how for the code to compare what is the value?

For example:

Ask_price=MarketInfo(Symbol(),MODE_ASK);

if (Ask_price>1.35946)

I get 1.3595 and compare it with1.35946 (+1 digit).

will it work? Or is it still rounded?

p.s. How would I write code without worrying that there are only 4 characters on the screen? There are 5 of them in the value anyway?
(becauseDoubleToString is text to text conversion)

 
Xenon:

Guys, what's the problem? I can't figure out what's wrong...

If I remove orderType or replace it with a number, everything compiles fine.How may there be an "ambiguous call"?


OrderType is a reserved name, the enumeration should have some other name.

 

OrderSend ()

slippage,// slippage

Can you tell me in what format ?

Example: 3 - 0.00003 or 0.0003 to a five digit account

 
culler:

OrderSend ()

slippage,// slippage

Can you tell me in what format ?

Example: 3 - 0.00003 or 0.0003 to a five digit account


3 for a 4-digit account is 30 for a 5-digit account respectively, but if you really want to, you can also leave 3 for a 5-digit account, just the re-quotes will be constant.
Reason: