[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 970
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
Thank you.
warnings
My mother tongue is Ukrainian. But thank you for your attention.
Help! If I have 2 pendants set and one of them closed by Take Profit, I need the 2nd one to be deleted. How do I write it? Where is the error in the code?
Good evening (I forgot to say hello in previous posts). Can you advise which function to use to do the following. In the Expert Advisor is opening an order by the indicator on the current candle (let it be number = 9). If after the opening order, it (the indicator) re-draw (and after closing candle 9 did not appear), then I need to AFTER the closing candle 9 order closed.
There are input parameters:
bool Mart - if true, it means there was a closed order on a stop, hence doing a doubling.
TradeInf - trade permission, if true, it means that there are no traded orders and we may trade)
There is the following code:
if (Mart == true && TradeInf==true)
{
Alert("double the lot");
LotS=NormalizeDouble(LotS*martin,2);
Alert("lot size",LotS);
}
if (Mart == false && TradeInf==true)
{
Alert("Reset lot");
LotS=lot;
}
Then in OpenOrder commands, lot size = LotS.
So if it finds a lot closed by lot, the lot size becomes -9315605757223323600
why? What's the reason?
Hello, I'm calculating a lot from a balance value according to a different principle...
I end up with a number like 0.2345, how do I cut double without rounding it, I mean:
to one digit - 0.2
to two digits - 0.23
to three - 0.234 and so on...
Hello, I'm calculating a lot from a balance value according to a different principle...
I end up with a number like 0.2345, how do I cut double without rounding it, I mean:
to one digit - 0.2
to two digits - 0.23
to three - 0.234 etc...
double lot = NormalizeDouble(LOT,2)
lot - for placing orders
LOT - formula for order calculation
"2" - rounding to 2 decimal places.
It's against the rules of rounding, let's wait for what the older comrades have to say.
Uh... Gentlemen. You can't normalise lots like that... :) Here's a little help: