OnShare()

View as Markdown

Definition

This method is called when the user clicks OK on the Share window in NinjaTrader. This method can also be called by Alerts and general NinjaScript objects.

Method Return Value

This method does not return a value.

Parameters

ParameterDescription
textThe message being sent to the social network or other Share provider. This is what appears in the textbox of the Share window.
imageFilePathOptional path to screenshot or other image to be sent to the social network or other Share provider.

Syntax

You must override the method in your Share Service with the following syntax.

public override void OnShare(string text, string imageFilePath)

Examples

1public override void OnShare(string text, string imgFilePath)
2{
3 // place your share service logic here
4}