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.
    Brandon H.NinjaTrader Customer Service

    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.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by czeyujg, Today, 09:12 PM
        0 responses
        2 views
        0 likes
        Last Post czeyujg
        by czeyujg
         
        Started by lobuysape, Today, 09:10 PM
        0 responses
        1 view
        0 likes
        Last Post lobuysape  
        Started by nutmame1, Today, 08:26 PM
        0 responses
        5 views
        0 likes
        Last Post nutmame1  
        Started by dr0832, Today, 07:02 PM
        0 responses
        10 views
        0 likes
        Last Post dr0832
        by dr0832
         
        Started by mlurskint8, Today, 05:27 PM
        3 responses
        18 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Working...
        X