TIME values for the previous day's HIGH and LOW prices
TIME values for the previous day's HIGH and LOW prices
22 Oct 2020, 19:07
Hi Folks
How to get the corresponding TIME values for the previous day's HIGH and LOW prices?
Replies
YouFX65
24 Oct 2020, 01:49
( Updated at: 21 Dec 2023, 09:22 )
TIME values for the previous day's HIGH and LOW prices
PanagiotisCharalampous said:
Hi YouFX,
You can get the opening times of bars using OpenTimes time series.
Best Regards,
Panagiotis
Hi Mr. Panagiotis Charalampous
Thank you so much for your response.
Please, could you complete the code below?
I will appreciate your help.
Thanks and best regards
GLAUCO
private MarketSeries daily;
protected override void Initialize()
{
daily = MarketData.GetSeries(TimeFrame.Daily);
var dailyHigh = daily.High.Last(1);
var TimeHIGH = ???????
var dailyLow = daily.Low.Last(1);
var TimeLOW = ???????
}
@YouFX65
PanagiotisCharalampous
26 Oct 2020, 08:03
Hi YouFX,
See below
protected override void Initialize()
{
var daily = MarketData.GetSeries(TimeFrame.Daily);
var dailyHigh = daily.High.Last(1);
var TimeHIGH = daily.OpenTime.Last(1);
var dailyLow = daily.Low.Last(1);
var TimeLOW = daily.OpenTime.Last(1);
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
YouFX65
26 Oct 2020, 14:58
( Updated at: 21 Dec 2023, 09:22 )
TIME values for the previous day's HIGH and LOW prices
PanagiotisCharalampous said:
Hi YouFX,
See below
protected override void Initialize() { var daily = MarketData.GetSeries(TimeFrame.Daily); var dailyHigh = daily.High.Last(1); var TimeHIGH = daily.OpenTime.Last(1); var dailyLow = daily.Low.Last(1); var TimeLOW = daily.OpenTime.Last(1); }
Best Regards,
Panagiotis
Hi Mr Charalampous
In the code you sent, we have TimeHIGH equal to TimeLOW.
But in reality, these TimeHIGH and TimeLOW values are different, as shown in the figure below.
In this figure, we have TimeHIGH > TimeLOW. Both values are differents from OpenTime of the period.
@YouFX65
PanagiotisCharalampous
26 Oct 2020, 15:01
Hi YouFX,
I know that. My code is adjusted to your code. To detect the indices of the high and low you will need to implement the relevant functionality..
Best Regards,
Panagiotis
@PanagiotisCharalampous
YouFX65
26 Oct 2020, 15:17
( Updated at: 21 Dec 2023, 09:22 )
RE:
PanagiotisCharalampous said:
Hi YouFX,
I know that. My code is adjusted to your code. To detect the indices of the high and low you will need to implement the relevant functionality..
Best Regards,
Panagiotis
Hi Mr Charalampous
Is there a function (code) that allows us to get the values of TimeHIGH and TimeLOW as shown in the figure below?
@YouFX65
PanagiotisCharalampous
26 Oct 2020, 15:19
Hi YouFX,
You will need to write this code yourself.
Best Regards,
Panagiotis
@PanagiotisCharalampous
YouFX65
26 Oct 2020, 19:24
RE:
PanagiotisCharalampous said:
Hi YouFX,
You will need to write this code yourself.
Best Regards,
Panagiotis
OK Mr Charalampous
Thank you.
I just have one more question:
When I use the PRINT function on a robot, the LOG tab appears (cBot Log).
When I use the PRINT function inside an indicator, where can I see the result?
Where is the LOG tab for indicators (Indicator Log)?
@YouFX65
PanagiotisCharalampous
27 Oct 2020, 07:44
Hi YouFX,
Indicators do not print in the cBot log at the moment but we plan to add this possibility in a future update.
Best Regards,
Panagiotis
@PanagiotisCharalampous
YouFX65
09 Nov 2020, 03:12
Initial daily balance
PanagiotisCharalampous said:
Hi YouFX,
Indicators do not print in the cBot log at the moment but we plan to add this possibility in a future update.
Best Regards,
Panagiotis
Thank you, Mr. Charalampous
I am new to cTrader C# language. I have already searched extensively on the internet for a command that would return the initial daily balance (the balance at the beginning of the Wellington trading session). Could you kindly inform me how, or where can I get this cTrader C# command?
Thanks and best regards
YouFX65
@YouFX65
PanagiotisCharalampous
09 Nov 2020, 09:18
Hi YouFX,
There is no such method in the API. You will need to write your own code for this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 08:03
Hi YouFX,
You can get the opening times of bars using OpenTimes time series.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous