I have applied CloseD function and would like get the close of the previous day. I found that the result always return "-1" which is obviously wrong.
May I ask if the CloseD function is not working on 1 Tick chart? and the reason why (programmatically)
Code:
CloseD previous_close;
Create()
{ previous_close; = new CloseD(this);
....}
StartCal()
{previous_close.periodsago = 1;
...}
Calbar()
{ previous_close[1];
...
CloseD function not working on 1 Tick chart?
-
- Posts: 21
- Joined: 08 Mar 2021
- Been thanked: 1 time
- Tammy MultiCharts
- Posts: 200
- Joined: 06 Aug 2020
- Has thanked: 6 times
- Been thanked: 65 times
Re: CloseD function not working on 1 Tick chart?
Hello lewisthegood,
We checked it on our end and found out that OHLCPeriodsAgo function is not working as expected.
Our engineers will fix it in one of the nearest releases.
In the meantime please replace the function with the attached script.
We checked it on our end and found out that OHLCPeriodsAgo function is not working as expected.
Our engineers will fix it in one of the nearest releases.
In the meantime please replace the function with the attached script.
- Attachments
-
- OHLCPeriodsAgo_Modify.pln
- (2.42 KiB) Downloaded 108 times