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
Are you interested in a specific position (known symbol and its Id) or a general case for all positions?
Are you interested in a specific position (symbol and its Id are known) or the general case for all positions?
If you just look through the history and analyze deals (using mydeal), then approximately so:
1. We obtain the total number of deals for the period, going through them and selecting only those according to the symbol and/or those that participated in forming the position
2. it is better to select deals not by symbol, but by specific position ID (it's easier and more reliable).
Although I am sure there are more correct and simple solutions.
Thanks for the solution.
I thought I was missing something in the standard library, there is an open time and change time is also an important parameter?
There are 3 positions for 3 different known instruments, we should check at the time the signal to open, time to change not to add too often.
Then form it into a function with SymbolTitle and ID parameters (if you need ID).
And call the function from any place.
Cool option would be to create its descendant from CPositionInfo and add similar functionality to it.
PS
By the way, the developers - it would be nice to add to the standard library functionality for CPositionInfo, which at least automatically fills an array of deals for the selected position (I think there is no such thing yet).
This is the kind of nonsense that came up in the log after the update command was executed on the graph:
2011.02.03 02:24:51 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:50 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:49 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:48 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:47 HistoryBase '#IBM' 1 invalid bars removed
2011.02.03 02:24:46 HistoryBase '#IBM' 1 invalid bars removed
etc every second.
TF Hourly
Thanks for the solution.
I thought I had overlooked somewhere in the standard library, there is an open time and change time as an important parameter too?
What do you mean by 'position change time' ? What has to change there for you to notice the change ?
Volume.
What's wrong with that :)
What's wrong with that :)
By the way, the developers - it would be nice to add to the standard library functionality for CPositionInfo, which at least automatically fills an array of deals for the selected position (I think there is no such thing yet).
But there is a function HistorySelectByPosition(), which does the same thing, all we need to know the identifier of the position. And it allows to obtain the history for both existing positions, and for those already closed. What will your proposed method return? An array of deals on the existing position, or the entire history of the symbol? And if there is no position at the moment, what will it return?
Volume.