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

Modifications to chart WPF elements and tab considerations

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

  • soulfx
    replied
    Thanks for checking, I will recheck and test on my end

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello soulfx,

    To confirm you are testing the script found here:
    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


    I am not able to reproduce this behavior. Below is a link to a video I have recorded using 8.0.9.0 testing the indicator added to multiple tabs, as well as a tab with no indicator, and starting with and without connect on startup.
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    Using the example script, with the steps taken in the video, are you experiencing different behavior than what is shown in the video?
    Last edited by NinjaTrader_ChelseaB; 10-18-2017, 02:55 PM.

    Leave a comment:


  • soulfx
    replied
    menu items appearing in the chart menu at top

    Hello, In reference to the ChartCustomToolBarExample ; i based my code from some of this structure a while back.

    And i have various menu items appearing on the main menu for certain tabs where a specific indicator is loaded.

    This works well in general ; however when i start ninja (without a connection / or with a connect on startup) it seems all the menus items for each of the tabs (where the indicator is loaded) all appear along the top menu bar of the chart. Until i select a tab then the others clear and i now only have the menu items for the selected tab in focus.

    Is there something i additionally need to do in order to Not have all the items appear when starting. Is it the case when starting ninja with multiple tabs in a chart no tab has been selected so it is not clear which items to make invisible which is handled in the tab selection handler ?

    thanks

    Leave a comment:


  • kkc2015
    replied
    Hello Jesse,
    Thanks for the quick response. While changing the width of the added panel can be achieved easily as per your suggestion, placing the panel on the left side of the NT chart proves to be rather difficult. Setting chartGrid to HorizontalAlignment.Left resulted in pushing both the NT chart and added panel to the left side of the canvas with a wide area of transparent canvas on the right.
    Anyways, having the panel buttons on the right side of the charts does not look so bad any more.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the reply.

    To change the position of where items are placed in the panel, you would need to utilize the Column and Row definitions to position your item in the layout grid.

    You can see this is done in the sample in the method InsertWPFControls

    a new column is added to the right of MainTabControl and all items to the right of the MainTabControl are shifted to the right to account for that item. To change this to the left would require that you change this logic to shift the MainTabControl and everything else to the right. You would also need to adjust the logic in RemoveWPFControls to account for the change.

    The width is controlled in the line below this comment:

    Code:
    // a new column is added to the right of MainTabControl
    chartGrid.ColumnDefinitions.Insert((tabControlStartColumn + 1), new System.Windows.Controls.ColumnDefinition() { Width = new GridLength([B]125[/B]) });
    You are controlling the width of the Column you define which is later inserted in the grid.
    In case these concepts are difficult to visualize, these are standard WPF concepts related to Grids which there are many tutorials for online.

    I look forward to being of further assistance.

    Leave a comment:


  • kkc2015
    replied
    Hello, ChelseaB
    Thank you for the useful examples. For the SidePanel example, while I can change the panel background and button colors, could you please advise how to:
    1. Place the side panel on the left side of the chart.
    2. Change the width of the side panel.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the reply.

    The same concepts can be used in a Strategy, you could reference the Indicator for a sample of the syntax required to append items to the GUI. The concepts in the indicator are able to be used wherever the ChartControl is present.

    To enter strategy orders, you could use the following page as a reference to the commands: http://ninjatrader.com/support/helpG...d_approach.htm

    I look forward to being of further assistance.

    Leave a comment:


  • ClauTrade
    replied
    Hello,

    many thanks for the sample code in first post.

    About "ChartCustomSidePanelExample_NT8.zip" please could you suggest the code to add the action to a strategy?

    For example the code to push Botton 1 >> enter buy market?

    I have not understand how to do it!

    Thanks

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    you can find a short guide to using visual studio for debugging here: http://ninjatrader.com/support/helpG...isual%2Bstudio

    The debug mode is what would flag to compile with symbols so you can utilize breakpoints when attached to NinjaTrader.

    For the image, I am not certain I understand the comparison here. Are you saying that the buttons on the right side are different that the toolbar buttons? If so, yes that would be correct. The toolbar buttons are a specific style whereas the buttons on the right are just the general button style it appears. Could you provide more detail on this question if I am not seeing the correct part of the image?

    I look forward to being of further assistance.

    Leave a comment:


  • Subhash Badri
    replied
    Really helpful

    Chelsea, thanks for the support
    I have couple of questions:
    1. how to develop/debug these addons from the visual studio?, The cs file is placed in the indicators directory and no PDB, so not sure if there is a way to debug these addons
    2. The controls inside the chart are wierd, outside ones are correctly displayed. pasting the screenshot for the inside ones. even the toolbar ones are good.

    thanks,
    Subhash
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Subhash,

    You have not added the indicator to the chart.

    No indicator will do anything if it is not added to a chart.

    Add the indicator to the chart from the Indicator window.

    NinjaTrader is an award-winning, end-to-end online trading platform for discretionary and automated trading for stocks, futures and forex.Download NinjaTrade...

    Leave a comment:


  • Subhash Badri
    replied
    full process screenshot

    No errors seen in the log tab and no information seen in the "ninja script output" window.
    Attached Files

    Leave a comment:


  • Subhash Badri
    replied
    attaching the chart screenshot

    I do not see any error either in the log of cc or in the ninja output editor.
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Subhash,

    Please include a screenshot of your chart so that I may see the indicator has been applied.

    Also, are there any errors in the Log tab of the Control Center?

    Leave a comment:


  • Subhash Badri
    replied
    Still not working

    I followed the exact steps like you suggested. I checked the custom\indicators folder and the file is present and I hope that confirms that import was successful.

    I launch the chart but do not see any button controls.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by joselube001, 05-10-2024, 12:17 PM
5 responses
23 views
0 likes
Last Post joselube001  
Started by bigc0220, 09-18-2018, 09:16 AM
6 responses
2,579 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by lorem, 04-25-2024, 09:18 AM
18 responses
76 views
0 likes
Last Post lorem
by lorem
 
Started by DawnTreader, 05-08-2024, 05:58 PM
21 responses
81 views
0 likes
Last Post NinjaTrader_Gaby  
Started by doihaveto13, Today, 12:46 PM
2 responses
4 views
0 likes
Last Post doihaveto13  
Working...
X