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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    57 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X