Topics
Replies
arturbrylka
16 Mar 2021, 10:54
RE:
PanagiotisCharalampous said:
Dear arturbrylka,
Can you explain in more detail what do you mean when you saybeen pushed automatically through the indicator.
Where is the indicator declared? Can you provide the code? How do you check if the bars are "pushed"?
Best Regards,
Panagiotis
1) The indicator is declared in the bot:
private MyIndicator myi;
protected override void OnStart()
{
...
myi = Indicators.GetIndicator<MyIndicator>();
}
2) I see that the bars are not pushed through the indicator as I am logging to console from the OnBarClosed within the indicator:
public void OnBarClosed(int index)
{
Print("tick: " + series1.OpenTime[index]);
.....
Please remember: During backtesting every works completely fine, so I have no doubts about the general functioning of the code.
@arturbrylka
arturbrylka
16 Mar 2021, 10:17
( Updated at: 16 Mar 2021, 10:18 )
RE:
PanagiotisCharalampous said:
Dear arturbrylka,
You can use LoadMoreHistory method to achieve this.Best Regards,
Panagiotis
Hi Panagiotis,
that's what I already did, as You described in another thread. I put it in the bot, which loaded then more ticks but the bars have not been pushed automatically through the indicator.
protected override void OnStart()
{
Print("{0} bar on the chart. Loading 10 000 bars", Bars.Count);
while (Bars.Count < 10000)
{
var loadedCount = Bars.LoadMoreHistory();
Print("Loaded {0} bars", loadedCount);
if (loadedCount == 0)
break;
}
Print("Finished, total bars {0}", Bars.Count);
....
}
@arturbrylka
arturbrylka
28 Apr 2021, 10:22
RE:
amusleh said:
Hi Amusleh,
thank you for your comment. Just to avoid misunderstandings let me rephrase and underline the central point of my question:
Is there a possibility to print the stacktrace using the VS debug mode?
Kind regards
Artur
@arturbrylka