Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Parameter orders for calling indicator from within strategy

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

    Parameter orders for calling indicator from within strategy

    Hello, after creating some indicators for additional use to be invoked in a strategy, i came across this potential and annoying issue and just want some clarification as it consuming alot of time to get right.

    Previously on the indicator thread i had enquired about the ordering of parameters in NT7 and was advised that is was in alphabetical order and that i could use the \t\t\t in the properties section to enable some control of appearance of parameters in indicator panel.

    I have quite a few parameters for this indicator and the ordering is essential in order to call a third party library object which requires the parameters in a certain order.

    When i now call this indicator from within the strategy code ..... the editor brought up the method inputs and order and for some the bid and ask order was flipped around - i have now in addition to the \t\t named the parameters to ensure an order. I needed to exit ninja and restart in order to see this and now the strategy editor reflects an order i would expect. The question is how does the strategy calling an indicator determine from the ninjascript engine the order of parameters and the naming - does it take the name from the indicator properties .... public xxtype bid_value1 .... ? all the values are for xxtype .. but i want to ensure i map the strategy inputs to the indicator called in the strategy which then calls the object. I realise i have several layers here but i was getting some inconsistent results to running the indicator in the chart (with visual markers).
    I presume also the inidcator completely disregards visual and colour attributes and drawing inputs? Having now alphabeticised the parameters in the indicator the strategy editor now changes the order of the parameters - so i just want to ensure there wasnt something i was missing here. This kind of limitation (which i realise is being addressed in NT8) can introduce scope for unintended errors when calling indicators in a strategy where it happens to have a long sequence of inputs. Any confirmation on above would be appreciated thanks

    #2
    Hello,

    Thank you for the post.

    I am unsure I directly follow regarding your description, it seems the question here is what defines the order in which the Overloads are added to the indicator and why your script has properties that are not in the order you think it should be, is this correct?

    If so, could you provide a sample script that just has the properties in question how you have defined them so I could better understand exactly what you are seeing?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by adeelshahzad, Today, 03:54 AM
    4 responses
    22 views
    0 likes
    Last Post adeelshahzad  
    Started by merzo, 06-25-2023, 02:19 AM
    10 responses
    823 views
    1 like
    Last Post NinjaTrader_ChristopherJ  
    Started by frankthearm, Today, 09:08 AM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    43 views
    0 likes
    Last Post jeronymite  
    Started by yertle, Today, 08:38 AM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X