You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The NumberOfLossPosToday() function.
This function returns the number of losing positions closed today. Selection of positions to be taken into account is done using external parameters:
The PriceCloseLastPos() function.
This function returns the closing price of the last closed position. The selection of positions to be taken into account is specified by external parameters:
I second that. You could even do it this way. Not the whole library. But several libraries, and not at the end, but as the fi libraries accumulate on a particular topic.
For example, separately library on opening/closing (opening f-i just plus opening by Market Watch and closing)
The next library - with f.i.'s that return existence of positions by these or those attributes.
And so on.
Only it is necessary to collect here the suggestions of the present people on the complete set of libraries.
The PriceOpenLastPos() function.
This function returns the opening price of the last open position. The selection of positions to be taken into account is specified by external parameters:
The PriceOpenLastClosePos() function.
This function returns the opening price of the last closed position. The selection of positions to be taken into account is specified by external parameters:
I second that. You could even do it this way. Not the whole library. But several libraries, and not at the end, but as the fi libraries accumulate on a particular topic.
For example, separately library on opening/closing (opening f-i just plus opening by Market Watch and closing)
The next library - with f.i.'s that return the presence of positions by these or those attributes.
And so on.
I would like to make some suggestions on library acquisition.
Good afternoon.
Dear KimIV.
You are doing a very useful thing for novice expert writers.
I join the previous petitioner.
If it's not difficult, can you gather into one "expert template " the main functions.
-Preliminary checks
-opening of a position
-Place order
-Close a position
-Remove orders
-Support (modification) of orders and positions.
And everyone will write a block with calls to these functions themselves.
I cannot write an EA from scratch myself.
That is why I started by changing someone else's code.
I started to add your functions in blocks - what I get is messy.
After a few days of corrections and additions, the trial Expert Advisor worked, but very poorly.
That's why I made this request, to create a simple Expert Advisor template.
Roche's template is somewhat difficult for me to understand and redundant at the start - from MetaEditor's article : Building on the power of templates.
The PriceOpenNearPos() function.
This function returns the opening price of the nearest position. The minimum distance in pips between the position opening price and the current market price serves as the criterion for the "closeness" of a position. Selection of positions to be taken into account is set by external parameters:
SZY. Attached is a script to test PriceOpenNearPos() function.
If anyone is interested, compare DistMarketAndPos() and PriceOpenNearPos() for yourself. Note the differences.
The TicketNearPos() function.
This function returns the ticket of the position closest to the market. The minimum distance in points between the opening price and the current market price is used as the criterion for the "closeness" of a position. Selection of positions to be considered is set by external parameters:
TypeNearPos() function.
This function returns the type(0-Buy, 1-Sell) of the position closest to the market at opening price or -1. The minimum distance in pips between the opening price of a position and the current market price serves as the criterion for the "closeness" of a position. Selection of positions to be taken into account is set by external parameters: