[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 510

 
borilunad:

You can do it without functions:

Before you rush to answer, you should first have bothered to read the conditions carefully (what the person wants) and then take and calculate the results of your code.
For a start, the conversation is about Deposit, and this is AccountBalance(). Equ/depo is a fractional number, and what kind of staggering can we be talking about???
 
TarasBY:
Before you rush to answer, you should first read the conditions carefully (what the person wants) and then take the results of your code and calculate them.
For a start, the conversation is about Deposit, and that is AccountBalance(). Equ/depo is a fractional number, and what kind of staggering can we be talking about???

I suppose smoothness is more appropriate here too than steppedness. And as for "what the man needs", you know perfectly well that he's not yet clear on what he needs!
 
T-G:

Hello.

We need the function that calculates the lot in increments. What would be possible to adjust, for example, for every 500 come increase lots

So depo 1000 - lot 0.1

Depo 1500 - lot 0.15

2000 - lot 0.2

Please post the function.


int start(){double lot,V=AccountBalance();if(V<1000){lot=0.05;return(0);}
  V=MathFloor(AccountBalance()/500);lot=NormalizeDouble ((V*5)/100,2);
  Alert("lot = ",lot);return(0);}
 
Roll:

the most important line:

double lot, V=AccountBalance();
if (V<1000) {lot=0.05;return(0);}
if the balance falls below 1,000 - I WILL NOT work - that's RIGHT!!! - MM, after all :)))
 
borilunad:

I think smoother is more appropriate than staggered as well. And as for "what the man needs", you know very well that he is not yet clear on what he needs!
Huh?! - Well, then a postscript is appropriate: "Listen, Vanya, your favorite song "About valenki" and do not show off." :)))
 
TarasBY:
Ah-ah-ah?! - Well, then a postscript is appropriate: "Listen, Vanya, your favorite song "About valenki" and do not show off." :)))


But seriously? Why hide from newcomers that the calculation from Equity is less dangerous than from Balance?

I generally calculate from AccountFreeMargin() and feel at ease! And no valenki! :))

 
borilunad:


But seriously? Why hide from newcomers that calculating from Equity is less dangerous than from Balance?

I generally calculate from AccountFreeMargin() and feel at ease! And no valenki! :))

Who decided that? - I would not be so quick to state this unambiguously, because there are many BUTs in MM that you should not just read about, but "touch". If there is one Expert Advisor working in the account - one approach (I use Equity), and if there are several Expert Advisors in the account - this is an "investment portfolio" - the approach is completely different (you can use the results of the strategy - it's safer). And, not to go into these details for a beginner, it is easier to give him what he wants. We can't realise what we're not ready for (it's a feature of the human psyche)!!! ;)
 
TarasBY:
Who decided that? - I wouldn't be so quick to state it unambiguously, because there are many BUTs in MM, which you should not just read, but "touch". If there is one EA in the account - one approach (I use Equity), and if there are several EAs in the account - it's already "a basket" - the approach is completely different (we can use the results of the strategy performance - it's safer). And, not to go into these details for a beginner, it is easier to give him what he wants. We cannot realise what we are not ready for!!! ;)


I agree that everyone has a different vision depending on the tasks at hand!

But it's better to give the beginner the tried-and-true, and he'll browbeat without it, even when he starts to realise something!

 
The question is this. If I want to place a Limit Pending Order which will trigger exactly at the opening of the Day Bar, i.e. the bar on TF D1. How should I implement it? I do not really understand the logic. I do not just want to place a Limit order, but a Limit order which will be triggered at a certain time, i.e. at the opening of a new bar of the day.
 
hoz:
The question is this. If I want to place a Limit Pending Order which will trigger exactly at the opening of the Day Bar, i.e. the bar on TF D1. How should I implement it? I do not really understand the logic. After all, I do not just need to put a limiter, but a limiter which is triggered at exactly the right time, i.e. at the opening of a new bar of the day.
When you know the answer to this question, don't forget to share the info.
Reason: