[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 31

 
Dear Professionals, please advise the fool what is wrong with the graph as the lines do not cross but the arrows jump out and vice versa lines cross but arrows do not jump out I do not know what to do
 
hoz:


As far as I've heard, the compiler removes all "voids" when compiling the code. Logically it should not care what variant to write for performance, because in the output of the compiled file will be the same "without voids".

Isn't it so?


Voids yes, but not logic. Correct logic + additional functions can speed up testing of EAs dozens of times. This is very important in MT4.

I am especially amused by this kind of crap in the code:

void start() {

   double ma1=iMA(blablabla,1),

          ma2=iMA(blablabla2,1);

   }

I have a great desire to smash the coder in the face for this nonsense.

 
keep87:


Blanks yes, but logic no. The right logic + additional features can accelerate EA testing dozens of times.


So, how would moving a bracket down one line change the logic? After all, the code structure remains the same, and consequently, so does the logic...
 
evgenGX:
Maybe, who has solved it and whether it is possible to do it in mt4. I haven't found it, I need an EA or a script which watches the trading of another EA (EA trades on different pairs with the same magik). And after each order closing a check on reaching profit on magik (previously entered into settings of watching EA). At higher or equal profit, the watching EA should stop trading with EA. In addition to this trading advisor, there are other trades on the account. As found EA EquityLimits(_http://mtexperts.narod.ru/files/EquityLimits_EA.ex4) monitors the current difference between account balance and funds and in case of reaching the specified limits, it closes all orders and disables all advisors (clicks the button "Advisors" on the toolbar). This point is not satisfied.

This is from Kim I.V. - an equity trawl of orders opened on the same magician. Edit it to suit your needs (in terms of closing all orders when you reach a certain level of profit, as you want). I am going to use it in trading myself. If there are many wizards, you should run this exp on different instruments, by quantity of wizards used.

P.S. What prevents you from writing code directly in the trading exp on the decision to close positions after the profit level is reached?

If you are interested, I can lay out my variant of solving this question in the trading expert at the closing of all orders of this exp at achievement of a pre-set level of loss in percentage of the size of DEP - fix the loss on profit, as you need and all.

P.P.S. I found it on the site:


e-CloseByEquity.rar


Files:
 

Good afternoon.

The input parameter of EA bool type cannot take part in optimization? - When I try to select such parameters as optimisable in the EA properties, it fails.

Sincerely, Michael.

 
Replikant:

Good afternoon.

The input parameter of EA bool type cannot take part in optimization? - When I try to select such parameters as optimisable in the EA properties, it fails.

Sincerely, Michael.


It cannot. Let's use int type (0--1), and slightly change the condition record.
 

granit77:
Не может. Используем тип int (0--1), и немного меняем запись условия.

Thank you!!!

but I'm afraid "a little" won't work))) - I have a three-storey boolean formula with 16 bool-type parameters)

 
When sending a buy order at Ask price, which price is the minimum Stop Loss and Take Profit set in relation to - Ask or Bid?
 
I need advice from an experienced programmer. When writing an EA node, I encountered a problem. I am not able to solve it myself yet. The EA is based on MA and support-resistance. Communication is preferred via Skype and Team Viewer on my computer.
 
HiThere:
When sending a buy order at Ask price, which price is the minimum Stop Loss and Take Profit set in relation to - Ask or Bid?

Learn.