Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

nested snippets not working

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

    nested snippets not working

    In NinjaScript Editor snippets insertion via TAB key works fine. For example if+TAB inserts the full if/than/else clause, o+TAB inserts Open[0] and c+TAB inserts Close[0]

    Anyway it seems to me that if I snippet in the if clause and then try to edit the condition (Open[0]<=Close[0]) with the corrispondent snippets, they don't respond. I have to insert the condition manually.
    Is it a bug?
    Thanks, bye
    Andrea

    #2
    Hello afoschini,

    Thank you for the post.

    I wanted to confirm I did the same test, I did if+tab so I had an open ( ) to edit, and then inside the ( ) press o+tab and the expectation is Open[0], correct?

    I don't believe in this case this would be a bug I believe in this case it would be expected to not generate any completion inside the ( ). The editor has its own independent auto completion for NinjaScript which is not the same as the Intelleprompt which comes up when inside a ( ). I can put in a feature request if that is the case, can you confirm that I have understood the steps you used correctly?

    The O+tab is specific for NinjaScript and does not seem to be available where intelleprompt appears. So I believe if that is the situation you described, the most simple way to keep auto generating code would be to do the condition first before your if:

    O+tab < C+tab
    Select the generated code control + X
    if+tab
    control+v
    enter

    The other approach would be to do if+tab then type OPE and Open will appear to be selected, however you will need to append the [0] as that is not a normal C# thing for intelleprompt to add, that would relate to NinjaScript specifically.


    I look forward to being of further assistance.


    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    158 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Today, 09:29 PM
    0 responses
    7 views
    0 likes
    Last Post Belfortbucks  
    Started by zstheorist, Today, 07:52 PM
    0 responses
    7 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    151 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    6 views
    0 likes
    Last Post mattbsea  
    Working...
    X