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

 
Vinin писал(а) >>

And MarketInfo() won't help with the relevant parameter

i wanted to write this first, but i couldn't do it so i wouldn't look too brazen ;-)) try it yourself and you'll see what i get....

there's only code 15 Contract size in the base currency of the instrument; i execute it at any marker and i get the same result: 1

while I have found another solution code 32 Size of free funds needed to open 1 lot to buy, but now there is another problem how to know the size of the security because it may be different for each index.... also found a solution to look at the broker's website.... But I don't like this "manual" look... I want to automate this process ... code 29 and 30 in any trading tool (even forex) for some reason gives 0 (zero) ... so i decided to ask the experts... maybe someone has solved this problem...

When I realized that the marketInfo gives information for now, but I need it at the time of opening a position ...

in general, if i fully formulate the problem, it looks like this: i have a portfolio of indices and i would like to know the value of each index at the time of opening a position, in order to understand the volume i have invested in a certain market....... I've already done it all with my hands... but I want to automate it ;-))

 

How to write minutes in the code, what to put in my head is already broken.



extern double StartHour = 14; // I would like to add more minutes


How to add them in the code or should I add minutes separately in one variable?


if(TimeFilter==true&&(Hour()<StartHour||Hour()>=EndHour))return(0);


Thanks in advance to those who will help.

 
jobber писал(а) >>

Thank you, I wanted to write in the beginning but I was too shy not to look cheeky ;-)) try it yourself and see what happens ....

there is only code 15 Contract size in the base currency of the instrument; i execute it at any marker and i get the same result: 1

while I have found another solution code 32 Size of free funds needed to open 1 lot to buy, but now there is another problem how to know the size of the security because it may be different for each index.... also found a solution to look at the broker's website.... But I don't like this "manual" look... I want to automate this process ... code 29 and 30 in any trading tool (even forex) for some reason gives 0 (zero) ... so decided to ask the experts... maybe someone has solved this problem...

When I realized that the marketInfo gives information for now, but I need it at the time of opening a position ...

in general, if i fully formulate the problem, it looks like this: i have a portfolio of indices and i want to know the value of each index at the time of opening a position, in order to understand the volume i have invested in which market.... I've already done it all with my hands... but I would like to automate it ;-))

I wanted to suggest using proportions, but it turns out that a lot of parameters will not be taken into account. A possible option is to save the required parameters each time the position is opened to a file. Although there may be other options.

 
Vinin писал(а) >>

I was going to suggest using proportions, but it turns out that a lot of parameters will be left out. A possible option is to save the required parameters each time a position is opened to a file. Although there may be other options.

I see. In general for now "by hand"....

 

how long can the magic order number be?

One more thing - an order comment has a maximum length of 27 symbols, the terminal can add something of its own to the comment, but at the end. if it does not have enough space, it will overwrite the last characters of user's comment.

 
beruk >> :

how long can a magic order number be?

32 bits, i.e. range from -2147483648 to +2147483647

 
beruk >> :

..., can the terminal add something of its own to the comment....... and is it even wise to use the comment to identify the order by the EA?

.....could of course pass a huge amount of information through a magic number, but it's too damn inconvenient.

How is a comment ("damned") more convenient than a magician?

 

Could you please tell me

ShellExecuteA(0,"Open",TerminalPath()+"\experts\files/"
+FileName+".html",0,0,SW_SHOW); 

is used to open an html file from the \experts\files directory, but I would like to make it possible to set the same code with which this file will be opened (for example, the default browser is not satisfied, I want to open it with notepad, for example) Is it possible?

 
Dimoncheg писал(а) >>

Could you please tell me

I would like to open html file from \experts\files directory, but I would like to set the same code with which this file will be opened (for example, the default browser does not suit me, I want to open it with notepad, for example) Is it possible?

You can open anything in anything.

#import "kernel32.dll"
int WinExec(string,int);
#import
int start(){
   WinExec("C:\\ Program Files\\ Winamp\\ winamp.exe  C:\\ WINDOWS\\ Media\\ tada.wav C:\\ WINDOWS\\ Media\\ chimes.wav",1);
   return(0);
}

First the path to the program, then a space and the name of the file you want to open.

 
rid писал(а) >>

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

Because the EA has one magician and you don't have to think about which magician should be set to which EA while launching several ones. It is convenient in use.

Reason: