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

 
Trader7777:

maybe it hangs on it too.



Of course it is.


 for (int i =0; i<=OrdersTotal(); i++)
 
What is the formula to calculate the lot, the balance went into deficit for N dollars what lot is needed to cover the deficit + TP
 
Trader7777:

what does it mean?

It means to check before division that the divisor is not zero.
 
vadynik:
Using which formula to calculate the lot, the balance went into deficit for N dollars which lot is needed to cover the deficit + TP

Lot can be stupidly doubled and calculate what TP is needed to go to Breakeven. But sooner or later Martin will lose even at doubling, and sometimes I'm itching to multiply the lot at once for 4 )))
 
evillive:

The lot can be simply doubled and calculate what TR is needed to break-even. But sooner or later Martin will lose even at doubling, and sometimes itching to multiply the lot at once by 4 )))

No, to double is not good, I want exactly the size of the loss to dance, and Martin is a Martin) handles and more and then long regretted sitting xD
 
telecserega:


cm-MA 29.04.13.rar

Can anyone decompile and change some parameters a bit????


Ban for 24 hours for inappropriate behaviour
 
fgyhtre:

Help from the pros

I cannot test the Expert Advisor at all(

2014.01.12 13:18:56 2014.01.10 22:41 MACD Sample USDCHF,M1: OrderSend error 4107
2014.01.12 13:18:56 2014.01.10 22:41 MACD Sample USDCHF,M1: invalid price 0.90324000 for OrderSend function

Can someone fix it?


Try inserting a line before OrderSend()

traderate = NormalizeDouble(traderate, Digits);

 
vadynik:

I want to dance on the size of the loss, and a Martin is a Martin) I used my hands and increased the amount, then long regretted sitting xD
Let's assume sterile laboratory conditions - swap = 0, commission = 0, spread = 1.

Suppose SL = 100 and TP = 100, the balance was 1000 quid and a position in Eurodollar volume of 0.1 lot closed on the SL. The balance will be 1000-100-1= 899 quid.

To cover the minus with the same TP as on the losing trade, it is enough for the next trade to close without slippage. The lot is increased only by one minimal step of the lot: lot=0.11, the balance = 899+110-1=1008.

In reality, there is a swap, commission, increased spread and slippage)))

And the pip value depends on the instrument, not on all pairs 1 pip equals 1 dollar for 0.1 lot.


Roughly, the formula will be (loss+spread+slippage+commission+slippage)*pip price/10 to the power where the power is the number of digits of the sum in brackets.

Example for Eurodollar, 0.1 lot with a 100 point loss: (100+5+2+1+5)*1/1000 = 0.113 - we bring it to the broker's lot requirements - lot = 0.11.

That is, if you open the position at 0.11 lots and it will close at 100 pips in profit, the balance will be in the plus - 899+110-5=1004 (5 is the spread).

 
Trader7777:

maybe it hangs on it too.



I wouldn't mess around with the i variable inside the "for (i=...)" loop.

IMHO, it's better to make a while loop (i<OrdersTotal()), set i=0 before this loop, and reset i=0 at each OrderClose, or else i++.

And break; at count >= n

 
Mr.Profit:


I wouldn't mess around with the i variable inside the "for (i=...)" loop...

IMHO - it is more correct to make a while loop (i<OrdersTotal()), assign i=0 before this loop, and reset i=0 at every OrderClose, otherwise i++.

And do a break; at count >= n


No one is messing around, you just have to set it in the right direction ))))