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

 
rid писал(а) >>

How is the comment ("damn") more convenient than the magician ?

I write reversal/reversal/portfolio number/advisor number/pattern number/algorithm/optimization in the comment.

If you want to get it in a line and divide it in parts. Besides, comment is more understandable not only for the system, but also for a trader. Besides, it has 27 digits against 10!

 
beruk >> :

I write aversion/reversal/portfolio number/advisor number/pattern number/algorithm/optimization in the comment.

Besides, the comment is easier to understand not only for the system, but also for a trader. Besides, it is 27 characters vs. 10!

You don't have to use string functions for that. After all, MQ4 has integer division operators and modulo division operators, with the help of which any integer can be decomposed into "pips".



For example, the port number is a number, and the number of the EA is a number from 0 to 11


Magik = portfolio_number * 12 + EA_number;


Inverse conversion:


int EA_number = Magik % 12;

int Portfolio Number = Magik / 12;

 
Reshetov писал(а) >>

It is not necessary to use string functions for this. The MQ4 has integer and modulo division operators, which can be used to decompose any integer into "bones".


For example, the port number is a number, and the number of the EA is a number from 0 to 11


Magik = portfolio_number * 11 + EA_number;


Inverse conversion:


int Advisor_number = Magik % 11;

int Portfolio Number = Magik / 11;

yes, yes, I was thinking of something like that!

But it's a bit complicated for me at the moment - at first I'll divide the magik into 3 lines: 100+1000+100, otherwise I'll never be able to do it that way...

 
Dear Professionals, could you please advise how to insert a command to unconditional buy at the current price of a pre-defined number of lots into an EA? How should this runoff look like? Thank you in advance.
 
MAGoG >> :
Dear Professionals, could you please tell me how to insert into an EA a command to buy unconditionally at the current price of a pre-defined number of lots? How should this runoff look like? Thank you in advance.

You go to the Code Base, open the view of any EA, and admire the lines that contain:


OrderSend(..., OP_BUY, ...)

 

Hi all, I've recently started learning MQL4. I am reading the tutorial. Thanks to the author!

I have noticed a few typos. I didn't know where I should write.

I decided to write while reading. I will forget about it later.

MQL4 Tutorial Trading Operations Opening and Setting Orders

There is a misprint in StopLoss and TakeProfit parameters. It should be point instead of Point.

//--------------------------------------------------------------------
// improved.mq4 
// Предназначен для использования в качестве примера в учебнике MQL4.
//--------------------------------------------------------------------
int start()                                     // Спец. функция start
  {
   double bid   =MarketInfo("GBPUSD",MODE_BID); // Запрос значения Bid
   double ask   =MarketInfo("GBPUSD",MODE_ASK); // Запрос значения Ask
   double point =MarketInfo("GBPUSD",MODE_POINT);//Запрос Point
   // Открытие BUY
   OrderSend("GBPUSD",OP_BUY,0.1,ask,3,bid-15*Point,bid+15*Point);
   Alert (GetLastError());                      // Сообщение об ошибке
   return;                                      // Выход из start()
  }
//--------------------------------------------------------------------

Somebody write where it should be written and is it really necessary?

PS: in MQL4 Tutorial Trading Operations Order characteristics and trading rules

StopLoss = Ask + minimum distance = 1.2989 + 0.0005 = 1.2994

TakeProfit = Ask - minimum distance = 1.2989 - 0.0005 = 1.2984.

In case the broker has currently set the value = 5, the limits of the freezing corridor will be 1.2994 and 1.2984, respectively. In this case, each of the stop orders would be on the freezing boundary, i.e. it would fall under the constraint set by the broker, so the order cannot be closed on the trader's initiative or by an order of the trading program. In this example, both stop orders are subject to the restriction at the same time.

It is not quite clear. First it writes that you can set stop orders at the boundary, and then it says you can't. Can anyone explain?

 

One more thing.

I am currently writing a thesis related to automated trading.

I do not have time to write my Expert Advisor. I am looking for one myself, but there are too many of them.

I've been looking for one myself, but it has too much stuff.

I don't need it to be profitable. The main thing is that it should be well written and I should be able to understand it.

And I will make a report to make a profit=).

By the way, I recently tested MACD_Sample on Eur/Usd H1. From January to May of this year it showed $800 profit on 0.1 lot. After optimization. Seems to me not bad =).

Although, I have tried all periods. I just found the most profitable one.

Thank you all in advance for the answers!

 
HungryStudent >> :

There is a script, as far as I understand there is a typo in the StopLoss and TakeProfit parameters. Instead of Point it should be point.

...

>> Can someone explain?

Point

double Point
The point size of the current instrument in the quote currency.
See also MarketInfo().
Example:
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point);

 
HungryStudent писал(а) >>

It is not quite clear. First it says you can set stop orders at the border, then it says you can't. Can someone explain?

That's right, you have to use Point, but if you are trading the current instrument you can also use Point.

When you open a trade, price may change by 1-3 points or more and then take or stop level enters the forbidden zone.

 
Dimoncheg >> :

With the mouse, then more or less understandable, I just plan to make a universal function that it does not matter which client was specifically as on computers that I use different clients, so here I see only one way out is to run the default client through this file, or maybe in some other way. Where do all these WinExec CopyFileA and DeleteFileA come from, where can I get them all and where can I read about them?

In particular, I'm interested in the following thing.

CopyFileA(TerminalPath()+"\\experts\\Bears Funeral.ex4","C:\\Games\\Bears Funeral.ex4",false)

- >> it's copying a file, but can you copy a folder in the same way?

Reason: