Help for " result"
Help for " result"
13 May 2024, 12:18
HI! I inserted a custom indicator in this part of code...How can I correct it by correctly inserting the "result" value?
Bars bars_l = MarketData.GetBars(TimeFrame.Minute15);
if (bars_l == null)
PrintErrorAndStop("INVALID_SYMBOL");
var sMAfast_l = Indicators.GetIndicator<SMAfast>(bars_l.ClosePrices, A_1mwdie5);
var sMAslow_r = Indicators.GetIndicator<SMAslow>(Bars.ClosePrices, A_svpg4c);
int crossPeriod = new[] { 0, 1 }.Max();
bool result = sMAfast_l.HasCrossedBelow(sMAslow_r, crossPeriod);
if (result)
{
return sMAfast_l.Last(1) < sMAslow_r.LastValue;
}
else
{
return false;
}
Replies
obus79
14 May 2024, 09:09
( Updated at: 15 May 2024, 05:17 )
RE: Help for " result"
PanagiotisCharalampous said:
Hi there,
Your question is not clear. Please explain what you think is wrong and how you would like it to be corrected.
Best regards,
Panagiotis
hi, the code written as follows is not correct and I don't understand how to fix it. I used " Indicator.GetIndicator<> " as it is a custom indicator. I removed ".Result " but I need to manage the value of Result somewhere...
@obus79
PanagiotisCharalampous
15 May 2024, 05:21
RE: RE: Help for " result"
obus79 said:
PanagiotisCharalampous said:
Hi there,
Your question is not clear. Please explain what you think is wrong and how you would like it to be corrected.
Best regards,
Panagiotis
hi, the code written as follows is not correct and I don't understand how to fix it. I used " Indicator.GetIndicator<> " as it is a custom indicator. I removed ".Result " but I need to manage the value of Result somewhere...
Does the indicator have a Result property? Can you share the indicator's source code?
@PanagiotisCharalampous
PanagiotisCharalampous
14 May 2024, 05:29
Hi there,
Your question is not clear. Please explain what you think is wrong and how you would like it to be corrected.
Best regards,
Panagiotis
@PanagiotisCharalampous