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

 
rid >> :

It's not quite clear. Where do you want the information to go?

Take a look at Kim's thread. 'Useful functions from KimIV'.

GetTypeLastClosePos() function. P.20
This function returns the type of the last closed position or -1.
The PriceCloseLastPos() function. P.24
This function returns the closing price of the last closed position.
The PriceOpenLastPos() function. P.24
Function PriceOpenLastClosePos(). P.24
This function returns the open price of the last closed position.

etc.

All functions work like clockwork. I checked it myself - I put it in the comment.

To open no more than one position, you can use

Function ExistPositions(). Page 4
It is intended for checking if there are open Sell or Buy positions.





Thanks for your help, the functions from KimIV are just what we need... The only thing left to do is to put them together to get all the information at once. And about the information output, ... I meant any output, well as a variant to the Expert Log via Print or Alert. I understand that we have to create an array with information on closed and open orders to be able to access already closed positions? Or it does not have to be done?

 

Can be in the comment in the START function. It is displayed on the graph. It looks like this:

Comment (
"Тип посл.закрытой позиции =", GetTypeLastClosePos(NULL, -1),"\n",
"Цена посл.закрытой селл позиции= ", PriceCloseLastPos(NULL,OP_SELL,-1),"\n",
"Цена посл.закрытой бай- позиции= ", PriceCloseLastPos(NULL,OP_BUY,-1),"\n",
"Число уб.поз., закрытых сегодня=", NumberOfLossPosToday(NULL,-1,-1)
);

And so on, by analogy...

Alas, I can't answer about arrays...

 

Hello.

I am a newbie and I have some questions I would like to get some qualified answers to.

I have downloaded several well advertised profitable Expert Advisors on the Internet: enLight Surfing, Platinum Fair Money, ILAN_Profit_1.5, PROFITDAY_PRO_v._2009 etc.

I checked them on my demo account and they all fail.

I have no idea whether I am doing something wrong or these EAs?

 
MaxV42 писал(а) >>

Hello.

I am a newbie and I have some questions I would like to get some qualified answers to.

I have downloaded several well advertised profitable Expert Advisors on the Internet: enLight Surfing, Platinum Fair Money, ILAN_Profit_1.5, PROFITDAY_PRO_v._2009 etc.

I checked them on my demo account and they all fail.

I cannot decide whether I am doing something wrong or the Expert Advisors are the same?

I have to select the required settings first. And then check them.

 
Vinin >> :

An additional indicator with intermediate calculations would help. Unless, of course, they need to be displayed.

I have an indicator in which I use six buffers for intermediate calculations and two for output to the chart. I need one more for displaying on the chart. Can you tell me how to do this?

 
Vitalik_on писал(а) >>

I have an indicator in which I use six buffers for intermediate calculations and two for chart output. I need one more to display on the chart. Can you tell me how to do that?

I can't tell you how. I will have to look at the indicator. Probably, it will be possible to do something.

 
Rita >> :

Can be in the comment in the START function. It is displayed on the graph. It looks like this:

And so on, by analogy...

Unfortunately, I can't answer with arrays...

Thank you all! all worked out at this stage, I'll be back with questions if anything )! Question closed.

 
MaxV42 >> :

I am a beginner, and I have some questions that I would like to get some qualified answers to.

I downloaded several well-publicized profitable Expert Advisors on the Internet: enLight Surfing, Platinum Fair Money, ILAN_Profit_1.5, PROFITDAY_PRO_v._2009 etc.

Checked them on a demo account, all lose.

Check it out. It will help. - Testing and optimising EAs

 
Vinin >> :

There's no way to tell. You have to look at the indicator. There might be something we can do.

Ah, that's it, figured it out. You don't need to use buffer to calculate standard indicators. It's enough to use iADX function, for example, and that's it. All six buffers are freed. Have I got it right? Can I use non-standard indicators in the same way? For example iSamodelka

 
Vitalik_on >> :

Can non-standard custom indicators be used as well? For example iSamodelka

For custom indicators:

//--------------------------------------------------------------------

double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)
Calculation of the specified custom indicator. The custom indicator must be compiled (a file with EX4 extension) and located in terminal_directory\experts\indicators.
Parameters:
symbol - symbol name of the instrument, on the data of which the indicator will be calculated. NULL means current symbol.
timeframe - Period. Can be one of the chart periods. 0 means period of the current chart.
name - Name of the custom indicator.
... - List of parameters (if needed). Passed parameters should correspond with the order of declaration and type of external (extern) variables of the custom indicator.
mode - Index of the indicator line. Can be from 0 to 7 and must correspond to the index, used by one of the SetIndexBuffer functions.
shift - index of the value received from the indicator buffer (shift relative to the current bar by the specified number of periods back).

Example:
double val=iCustom(NULL, 0, "Samodelka",......,1,0);




Reason: