You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good afternoon.
I modified GetProfitOpenPosInCurrency() function to return the worst losing position. Can you please tell which functions would be suitable to return the opening time of this position (OrderOpenTime())?
Good afternoon.
I modified GetProfitOpenPosInCurrency() function to return the worst losing position. Can you please tell which functions would be suitable to return the opening time of this position (OrderOpenTime())?
Return the ticket number and you can do with the standard functions
Return the ticket number and you can dispense with the standard functions
Thank you.
KimIV , hello.Looking for--can't find the script--delete all the pending orders on the symbol--and trawlon the symbol,maybe there is--post........ dont consider it impertinent.Thanks in advance .
Good afternoon.
I am using isTradeTimeInt() function from KimIV. I will use many time intervals and for each interval I will assign different variables. I have made this code for it (2 intervals so far). The question is, is this the most correct solution or should I approach the task differently?
Dear Igor Kim, help me write a function like OrderCloseBy(), but it should work on different pairs and OrderProfit(), and it does not matter if orders are differently directed or not, like one OrderProfit() > another, another pair, by how many points and both, exactly, only these two, close simultaneously. My variant is like this:
for (int i=OrdersTotal()-1;i>=0;i--)
}}}
Will it work? Correct or suggest your own solution, if you don't mind.
Dear Igor!
Could you please advise whether you have a function to calculate the lot volume depending on the account balance after closing the last order and before opening the next one?
I thank you in advance.
Dear Igor!
Could you please advise whether you have a function to calculate the lot volume depending on the account balance after closing the last order and before opening the next one?
I thank you in advance.
Here is Igor's function.
In the update the PriceOpenLastPos function stopped working in the conditions, almost broke my brain, it gives out values in the comments but does not work in the conditions, a small edit solved the problem.
datetime t;
double r=0, r2=0;
int i, k=OrdersTotal();
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==sy || sy=="") {
if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
if (op<0 || OrderType()==op) {
if (mn<0 || OrderMagicNumber()==mn) {
if (t<OrderOpenTime()) {
t=OrderOpenTime();
r=OrderOpenPrice();
}
}
}
}
}
}
}
r2 = DoubleToStr(r, 4);
return(r2);
}