NT8 Здорово с Вами на одной волне, точно! Как продолжение Вашего сообщения прямо сейчас вышел на вариант разбора с DirectX, как сделать такое !Да не конвертируете вы этот индикатор.
NT8 в этом плане как небо и земля отличается от NT7
Надо разбираться в DirectX чтобы такое сделать.
ImageBrush
Для удобства в спойлере текст английски и русский перевод:
Hello jshapen,
I have gotten some clarification from Product Management.
The entire area on a chart (ChartControl, all ChartPanels, and Price/Time Scales) is rendered via SharpDX. When ChartControl.Background is set in skin, ChartControl.Properties.BackgroundBrush will inherit the SolidColorBrush from ChartControl.Background. An ImageBrush could not be used since ImageBrushes do not exist for SharpDX rendering.
The threading error is different considering the thread in which the ImageBrush is created and the UI thread that would use it. A Dispatcher could be used to create and set the brush on the appropriate thread, however we have other documented/supported means to set ChartControl's background brush to a supported brush. (ImageBrushes still could not be used for this instance)
In short, setting an ImageBrush for ChartControl.Background through the skin xaml is not possible because that part of the window is rendered with DirectX.
Furthermore, SharpDX rendering internally will clip all rendering to the NinjaScript's ChartPanel. This will need to be circumvented to render to the entire ChartControl area.
In order to accomplish the goal of setting the background to an image, you would have to use SharpDX rendering, use unsupported code to pop out of the clip rect and use your own, draw the image, and then set the clip rect back to the ChartPanel bounds.
Popping out of the clip rect is highly unsupported and will break hit testing with the NinjaScript among other things like gridlines. It will work enough for a standalone indicator, but I would not recommend doing this with an actual indicator.
Unsupported code attached, use at your own risk! (image1.jpg needs to be in Documents/NinjaTrader 8/)
We have a pending feature request to be able to apply images to ChartControl.Background, and I'll make sure we have your interest tracked on this item since the approach to accomplish this is not supported. I'll also note your interest to set via skin. The ticket ID is SFT-554.
We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.
Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
If there is another item we can provide assistance with, please let us know.
Перевод:
Привет jshapen, Я получил некоторые разъяснения от управления производством. Вся площадь на диаграмме (ChartControl, все ChartPanels, и цена/время Весы) выводится через SharpDX. Когда ChartControl.Фон установлен в скин, ChartControl.Свойства.BackgroundBrush наследуют от объекта solidcolorbrush ChartControl.Фон. Методу imagebrush не мог быть использован, поскольку ImageBrushes отсутствуют на оказание SharpDX. Ошибка потоковой передачи отличается с учетом потока, в котором создается ImageBrush и поток пользовательского интерфейса, который будет использовать его. Диспетчер может использоваться для создания и установки кисти в соответствующем потоке, однако у нас есть другие документированные / Поддерживаемые средства для установки фоновой кисти ChartControl для поддерживаемой кисти. (ImageBrushes все еще не мог использоваться для этого экземпляра) Короче говоря, установка ImageBrush для ChartControl.Фон через кожу xaml невозможен, так как эта часть окна визуализируется с помощью DirectX. Кроме того, SharpDX оказание внутренне закрепит все оказание ChartPanel в NinjaScript по. Это необходимо обойти, чтобы отобразить всю область ChartControl. Для того, чтобы достичь цели настройка фонового изображения, вам придется использовать SharpDX рендеринг, использовать неподдерживаемый код, чтобы выскочить из зажима прямоугольника и использовать свои собственные, нарисовать изображение, а затем установите зажим прямоугольник обратно на ChartPanel границы. Выскакивание из клипа rect сильно не поддерживается и сломает тестирование хитов с помощью NinjaScript, среди прочего, таких как линии сетки. Он будет работать достаточно для автономного индикатора, но я бы не рекомендовал делать это с фактическим индикатором. Неподдерживаемый код, используйте на свой страх и риск! (рис1.jpg должен быть в документах/NinjaTrader 8/) У нас есть ожидающий запрос функции, чтобы иметь возможность применять изображения к ChartControl.Предыстория, и я удостоверюсь, что мы отслеживаем ваш интерес по этому пункту, так как подход к выполнению этого не поддерживается. Также отмечу ваш интерес к установке через скин. Идентификатор билета-SFT-554. Мы не можем предложить ета или обещание исполнения, но мы отслеживаем интерес и номер билета будет отмечено в справке, когда новая сборка выйдет с функция реализована. Примечания к выпуску - https://ninjatrader.com/support/help...ease_notes.htm Если другой деталь, то мы можем обеспечить помощь с, пожалуйста препятствуйте нам знать.
I have gotten some clarification from Product Management.
The entire area on a chart (ChartControl, all ChartPanels, and Price/Time Scales) is rendered via SharpDX. When ChartControl.Background is set in skin, ChartControl.Properties.BackgroundBrush will inherit the SolidColorBrush from ChartControl.Background. An ImageBrush could not be used since ImageBrushes do not exist for SharpDX rendering.
The threading error is different considering the thread in which the ImageBrush is created and the UI thread that would use it. A Dispatcher could be used to create and set the brush on the appropriate thread, however we have other documented/supported means to set ChartControl's background brush to a supported brush. (ImageBrushes still could not be used for this instance)
In short, setting an ImageBrush for ChartControl.Background through the skin xaml is not possible because that part of the window is rendered with DirectX.
Furthermore, SharpDX rendering internally will clip all rendering to the NinjaScript's ChartPanel. This will need to be circumvented to render to the entire ChartControl area.
In order to accomplish the goal of setting the background to an image, you would have to use SharpDX rendering, use unsupported code to pop out of the clip rect and use your own, draw the image, and then set the clip rect back to the ChartPanel bounds.
Popping out of the clip rect is highly unsupported and will break hit testing with the NinjaScript among other things like gridlines. It will work enough for a standalone indicator, but I would not recommend doing this with an actual indicator.
Unsupported code attached, use at your own risk! (image1.jpg needs to be in Documents/NinjaTrader 8/)
We have a pending feature request to be able to apply images to ChartControl.Background, and I'll make sure we have your interest tracked on this item since the approach to accomplish this is not supported. I'll also note your interest to set via skin. The ticket ID is SFT-554.
We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.
Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
If there is another item we can provide assistance with, please let us know.
Перевод:
Привет jshapen, Я получил некоторые разъяснения от управления производством. Вся площадь на диаграмме (ChartControl, все ChartPanels, и цена/время Весы) выводится через SharpDX. Когда ChartControl.Фон установлен в скин, ChartControl.Свойства.BackgroundBrush наследуют от объекта solidcolorbrush ChartControl.Фон. Методу imagebrush не мог быть использован, поскольку ImageBrushes отсутствуют на оказание SharpDX. Ошибка потоковой передачи отличается с учетом потока, в котором создается ImageBrush и поток пользовательского интерфейса, который будет использовать его. Диспетчер может использоваться для создания и установки кисти в соответствующем потоке, однако у нас есть другие документированные / Поддерживаемые средства для установки фоновой кисти ChartControl для поддерживаемой кисти. (ImageBrushes все еще не мог использоваться для этого экземпляра) Короче говоря, установка ImageBrush для ChartControl.Фон через кожу xaml невозможен, так как эта часть окна визуализируется с помощью DirectX. Кроме того, SharpDX оказание внутренне закрепит все оказание ChartPanel в NinjaScript по. Это необходимо обойти, чтобы отобразить всю область ChartControl. Для того, чтобы достичь цели настройка фонового изображения, вам придется использовать SharpDX рендеринг, использовать неподдерживаемый код, чтобы выскочить из зажима прямоугольника и использовать свои собственные, нарисовать изображение, а затем установите зажим прямоугольник обратно на ChartPanel границы. Выскакивание из клипа rect сильно не поддерживается и сломает тестирование хитов с помощью NinjaScript, среди прочего, таких как линии сетки. Он будет работать достаточно для автономного индикатора, но я бы не рекомендовал делать это с фактическим индикатором. Неподдерживаемый код, используйте на свой страх и риск! (рис1.jpg должен быть в документах/NinjaTrader 8/) У нас есть ожидающий запрос функции, чтобы иметь возможность применять изображения к ChartControl.Предыстория, и я удостоверюсь, что мы отслеживаем ваш интерес по этому пункту, так как подход к выполнению этого не поддерживается. Также отмечу ваш интерес к установке через скин. Идентификатор билета-SFT-554. Мы не можем предложить ета или обещание исполнения, но мы отслеживаем интерес и номер билета будет отмечено в справке, когда новая сборка выйдет с функция реализована. Примечания к выпуску - https://ninjatrader.com/support/help...ease_notes.htm Если другой деталь, то мы можем обеспечить помощь с, пожалуйста препятствуйте нам знать.
Не получается понять рекомендацию/подсказку и проделать это всё на платформе...
Благодарен за любую помощь в этом деле.