[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 169
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
For each order: calculate the difference between the opening price and the price you need, multiply by the pip value, and by the order volume.
Add up.
This is a bit tricky.
Go through the open orders and sum up:
Possibly.
But if the reason is that the question is about MT5 and not MT4, then I was guided by this list:
It's just luring us to a fiver with its advertising... :-) For more - See Treugi coming up.
Uh-huh, and where do we come to ? read the question carefully. it's about calculating the profit, at a certain point, not the current one.
It seems so... unfortunately, it's problematic to check it on the tester (or I'm so sleepy I can't figure out how), check?
Good afternoon.
How do I check if a number is a whole number?
e.g. as a result of dividing from one number by another
Good afternoon.
How do I check if a number is a whole number?
For example, the result of dividing from one number by another?
You can go like this
Delta - Set error
I want to commit 2 trades in the history and perform an action on the third one, can you do this :
int Orders=HistoryTotal(); // history orders total
int Kol_Orders=0; // number of trades
for(int s=Orders-1;s>=0;s--)
{
if(OrderSelect(s,SELECT_BY_POS,MODE_HISTORY)==false)
{
Print("History error!");
break;
}
if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL || OrderMagicNumber()!=MAGIC)
continue;
Kol_Orders++;
}
bool CheckInt(double Value, double Delta){
Value=Kol_Orders/2;
delta =0.001;
if (MathAbs(Value-MathRound(Value))<Delta)
return(true);
return(false);
}
int Orders=HistoryTotal(); // history orders total
int Kol_Orders=0; // number of orders
for(int s=Orders-1;s>=0;s--)
{
if(OrderSelect(s,SELECT_BY_POS,MODE_HISTORY)==false)
{
Print("History error!");
break;
}
if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL || OrderMagicNumber()!=MAGIC)
continue;
Kol_Orders++;
}
if(MathMod(Kol_Orders/2,1.0)==0){
// input integer
}