Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issues while using custom indicator to write strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issues while using custom indicator to write strategy


    Hi ,

    I have custom indicator which is working fine and DLL also is there but the same is not able to use through strategy builder. Can you please help me how to use to create custom strategy :

    public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
    {
    private VOLAREIndicators.Volare_SuperTrendNewV2[] cacheVolare_SuperTrendNewV2;
    public VOLAREIndicators.Volare_SuperTrendNewV2 Volare_SuperTrendNewV2(BarsPeriodType _barsPeriodType, int _barsPeriod, int period, int factor)
    {
    return Volare_SuperTrendNewV2(Input, _barsPeriodType, _barsPeriod, period, factor);
    }

    public VOLAREIndicators.Volare_SuperTrendNewV2 Volare_SuperTrendNewV2(ISeries<double> input, BarsPeriodType _barsPeriodType, int _barsPeriod, int period, int factor)
    {
    if (cacheVolare_SuperTrendNewV2 != null)
    for (int idx = 0; idx < cacheVolare_SuperTrendNewV2.Length; idx++)
    if (cacheVolare_SuperTrendNewV2[idx] != null && cacheVolare_SuperTrendNewV2[idx]._BarsPeriodType == _barsPeriodType && cacheVolare_SuperTrendNewV2[idx]._barsPeriod == _barsPeriod && cacheVolare_SuperTrendNewV2[idx].Period == period && cacheVolare_SuperTrendNewV2[idx].Factor == factor && cacheVolare_SuperTrendNewV2[idx].EqualsInput(input))
    return cacheVolare_SuperTrendNewV2[idx];
    return CacheIndicator<VOLAREIndicators.Volare_SuperTrendN ewV2>(new VOLAREIndicators.Volare_SuperTrendNewV2(){ _BarsPeriodType = _barsPeriodType, _barsPeriod = _barsPeriod, Period = period, Factor = factor }, input, ref cacheVolare_SuperTrendNewV2);
    }

    #2
    Hello shankar.deshapande,

    Thank you for your post.

    See the help guide page below demonstrating how to make indicator to value comparisons using the Strategy Builder. Is the custom indicator not showing up in the Indicators folder when creating conditions and actions on the Conditions and Actions screen of the Strategy Builder?
    Strategy Builder Indicator to Value Comparisons - https://ninjatrader.com/support/help...lueComparisons

    Does the custom indicator use AddPlot() to create a plot and assigns a value to that plot?
    AddPlot() - https://ninjatrader.com/support/help...t8/addplot.htm

    Please note that the Strategy Builder only allows the use of indicators that contain a plot and assigns a value to that plot.

    I look forward to further assisting.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi ,
      Thanks for reply. Yes .Custom indicator showing in strategy builder conditions and action screen.but when i select and add conditions and try to compile it fails compilation and it is not showing any error also. where can i see error and attached is screenshot.

      Regards,
      Shankar
      Attached Files

      Comment


        #4
        Hello shankar.deshapande,

        Thank you for that information.

        Do you see any error messages occurring in the Log tab of the Control Center when you get the message stating your strategy cannot compile?

        Ultimately, if the Strategy Builder is unable to compile, I suggest closing the Strategy Builder and opening a new Strategy Builder to create a new strategy. This time, instead of selecting 'Compile' you should select the 'Unlock code' button in the Strategy Builder and then click the 'Compile' button in the NinjaScript Editor window. This will then allow you to view the compile errors that occur.

        Please let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        75 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        146 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        79 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        50 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        54 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X