Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 664

 
genino:
Tell me how to implement the idea. On every tick, we open two buy and sell orders if (for buy) there are no orders at the current Ask price in the market. For sell the same but with a Bid. Thanks in advance.

I'll give you a hint - there are three possibilities here:

Learn a programming language, for instance, MQL5, and implement all your "crazy" fantasies in the code. You spend time and effort on that. Meanwhile, you realize at the same time how foolish the task you defined at the very beginning was and realize how much effort you expended. But you grow as an expert and look at the world with a more competent view. (This is not directed at you personally - don't be offended. All programmers go through this, including very experienced ones. This is a natural and regular process).

2. You bring a lot of money if you don't want to grow yourself, but have the money to show off, and order it from an outside programmer, if he agrees to solve "obscure tasks", for not solving which (and this was originally in the problem statement) you will get on his nerves and reproach him for paid work.

3. You just realize that the task you set is unsuccessful, and you refuse to do it. Instead you come up with a new, better idea. This is a common and very frequent process for a creator.

But in general, it is your task, as a developer, to find a way to solve the problem. On the forum you can only help with the technical aspects of coding, occasionally programming. Otherwise it's a job which you either pay for or do yourself (possibly for others). Help and work are different in this. You are asking for work to be done, not help. Different tasks. Not to reproach, to help you understand the task definition (formulation).

 
271863768:

Please tell me how to separate the ticket for buy and sell separately?

ticket=OrderSend("EURUSD",OP_SELL,SellLot,Bid,3,0,0,",MAGICMA,0,Red);

else

{

OrderSelect(ticket-3,SELECT_BY_POS,MODE_TRADES);

OrderClose(ticket-3,SellLot,Ask,3,Red);

}

ticket-3, TK trade like averaged price on several orders ) but how do I separate buy tickets from sell tickets ? so I can take an order that was opened 3 buys ago ) Same for sell


The way you decide and formulate it, the answer is no way. But...

Since there are several ways to solve this problem, you can discard the way you describe and try to find a new one. Moreover, I will even tell you that it is a standard problem - it is described in "Textbook on MCL" - https://book.mql4.com/ru/

You just have to read it. 98% of your questions will be solved by yourself as the solution code is in the textbook.

 
waroder:

Hello friends!) I have such a problem:

I wrote a prog that opens a template (with the indicators and graphical object I need) on startup, then analyzes the data and trades. when I just run it on a chart, everything works fine. when I run it in a tester, it only works when visualized. i understand that the template can only be loaded on a visually open chart... so it doesn't work in normal test mode, because it just runs on the chart without loading the template... and what about the optimization? i have quite a few parameters, and it's somehow very unreasonable to run each option manually with visualization.

help plz)) how can i solve the problem with optimization and the template?

The formulation of the problem is interesting. But it is far from being a beginner's question. Judging by the lack of responses, no one knows how to properly solve it, that is, there is no ready-made solution. And with the tester a lot of unclear and undefined, because we don't know why it works, then it doesn't, and in different modes differently. We can only guess. But you have to know in order to solve it. Otherwise it is possible to stumble around for a long time. I think this question should be addressed directly to the developer.

If you decide, it will be interesting to know the solution of the problem.

 
MakarFX:

Good afternoon.

In the terminal, if I double click on the order line, a modification window opens.

But if the opening price of one order and the take profit of another order are on the line, the last modified order opens.

Please, advise if mql4 has a function to open the order modification window by clicking the necessary order in the indicator?


Why are you interested in modifying the order in the chart window? If I understood your question correctly? There is an alternative, which is absolutely unambiguous - double-click on the order on the "Trade" tab. And you will be very happy.
 
waroder:

Hello friends!) I have such a problem:

I wrote a prog that opens a template (with the indicators and graphical object I need) on startup, then analyzes the data and trades. when I just run it on a chart, everything works fine. when I run it in a tester, it only works when visualized. i understand that the template can only be loaded on a visually open chart... so it doesn't work in normal test mode, because it just runs on the chart without loading the template... and what about the optimization? i have quite a few parameters, and somehow it's very unreasonable to run each option manually with visualization.

help plz)) how can you solve the problem with the optimization and template?


Out of the corner of my eye, looked at solutions previously offered to you by other experts. You may have permission restrictions when loading templates. This is reflected in the description of the ChartApplyTemplate() function. But this is only as an option. Or something similar. So when you load through visualization, all permissions are preserved, but when programmatically, they are restricted.

Quote from the function description:

When the template is saved, the rights for the programs running on the graphic are also remembered: the right to trade and the right to use the DLL. For security reasons, these rights may be restricted when applying the template to the chart:

Trading and DLL usage rights cannot be increased when an EA is launched by applying a template using the ChartApplyTemplate() function.

If the mql4 program which calls ChartApplyTemplate() has no rights to trade, the EA loaded using the template will also have no rights to trade, regardless of the template settings.

If the mql4 program calling the ChartApplyTemplate() function has trading rights but the template settings do not, then the EA loaded using the template will not have trading rights.

 

Dear Experts!

Please advise which function returns the maximum of the previous (or any) daily candle in the TF 5 chart.

EXAMPLE(in TF 5)

int start()

{

if (Open[0] > High[max.value of previous day])day])

OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 );

return(0);

}

function iHighest(NULL,0,MODE_HIGH,3,1); will not work for this as the TF is different.

Thank you.

 
solnce600:

Dear Experts!

Please tell me which function returns the maximum of the previous (or any) daily candle on the TF-5 chart.

EXAMPLE(on TF 5)

int start()

{

if (Open[0] > High[max.day])

OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 );

return(0);

}

The function iHighest(NULL,0,MODE_HIGH,3,1); is not suitable for this because the TF is different.

Thank you.

The simpler variant is:

    iHigh (_Symbol, PERIOD_D1, 1);
- not satisfied???
 
Thanks....I didn't think of that right away!!!
 
optionany:

I'm going to rephrase my question:

What fixture or operator, can we implement: quotes*100 and drawing them on a chart, it takes two lines of code, I guess... who can help?

Thanks in advance


You can't do it directly on the chart. You could make a basement indicator.
 
create
nikitasa1997:

Good day, dear forum users, please help a newbie. I have made a custom indicator, below is a code fragment with more than 1000 lines like in the original code, that's why I haven't pasted the whole code.

The '+' - program is too complex. It gives out this error.

I read the forum threads, this error occurs when the function is too long. How can I divide a function into several subfunctions? Please, describe my code as an example.


create filter.mq4 file with this function and save it to \MQL4\Include\.


then call it from the indicator #include <filter.mq4>

if the variable response is in the indicator, you don't need to declare it, just use it where necessary.

Reason: