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

 

or help with a good decompiler

 
jeniaj83:

or help with a good decompiler


jeniaj83:
Hi all, who can help decompile an indicator

only help you with a good ban
 
jeniaj83, there are two options in such a case: at best they will send you to a shithouse, at worst to a bathhouse )))) Are you packed?
 
Link_x:
Until I'm an expert at it.
You don't need any tips now, do you? :)

Look up my questions (maybe you'll find some)
 

1) Who knows how to get the amount of profit on all open orders? The AccountProfit() function is probably a bit off.

2) How to close all open orders on all currency pairs simultaneously?

 
i999i:

1) Who knows how to get the amount of profit on all open orders? The AccountProfit() function is probably a bit off.

2) How to close all open orders for all currency pairs simultaneously?


for (int i = 0; i < OrdersTotal(); i++){
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true){
Profit = Profit + OrderProfit() + OrderCommission() + OrderSwap();
}

}

Only "Profit" needs to be declared as a fractional variable. If we add a check for Buy and Sell, we will be able to calculate the profit separately for Sell and Buy orders.

 

I want to place pending order, but I get error "Wrong prices", here is code: OrderSend(_Symbol,OP_BUYSTOP,Lot,_High+20*Point,0,0,0, "Lazy",id,Blue); .

If we do the following: "OrderSend(_Symbol,OP_BUYSTOP,Lot,NormalizeToDouble(_High+20*Point,Digits),0,0,0, "Lazy",id,Blue); " then it writes: "Wrong parameters" .

_High - is the maximum of the previous candle. Please help.

 
Example2:

for (int i = 0; i < OrdersTotal(); i++){
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true){
Profit = Profit + OrderProfit() + OrderCommission() + OrderSwap();
}

}

Only "Profit" needs to be declared as a fractional variable. If we add a check for Buy and Sell, then we can calculate the profit separately for Sell and Buy orders.


1) Learn to insert the code via SRC

2) The search is done through (int i = OrdersTotal()-1; i>=0; i--)

3) You could have written the declaration of the variable instead of writing that it is not written out

4) I don't know why I need to look through the orders.

You don't know a good answer, so why bother writing rubbish?

 
ALXIMIKS:


1) learn how to insert code via SRC

2) the enumeration is arranged for (int i = OrdersTotal()-1; i>=0; i--)

3) you could have written the declaration of the variable instead of writing that it is not registered

4) I don't know why I need to look through the orders.

You don't know a good answer, so why bother writing rubbish?


It doesn't matter how to enumerate, the main thing is that it works. If counting is done in a separate function, it is better to declare a variable for all functions, for further use in other functions.

It may be bullshit, but it works.

 
ALXIMIKS:


...

4) why do you have to go through the pauses???

...


О! Can you show me how not to go through them?

Of course, the question is interesting: is it better to add OrderProfit() + OrderCommission() + OrderSwap() that total 0 and change nothing, or do we need to do if for each order?

Reason: