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

List strategies /w performance for use in a return for the strategy to reference

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

  • NinjaTrader_Jesse
    replied
    Hello GTBrooks,

    I understand what you are trying to do but I don't know what you have tried or what you need help with. I provided some information in the last post, was that able to help you make any progress or what part do you need help with?

    A strategy has no NinjaScript way to be controlled from an outside source such as an addon. If you want to control strategies in some way you would have to make that system yourself. You may be able to use the strategies collection linked in my previous response to access strategy instances and work with them in various ways, had you explored that?

    Please let me know if I may be of further assistance.

    Leave a comment:


  • GTBrooks
    replied
    Maybe an example will help clarify what I am asking:

    Instrument being Traded EURGBP

    Strategy 1 = Profit Factor 2
    Strategy 2 = Profit Factor 1.5
    Strategy 3 = Profit Factor 1
    ​​
    AddOn: Input = Strategy 1 > Strategy 2 > Strategy 3
    Output = Strategy 1 allowed to trade maximum amount of account value
    Strategy 2 allowed to trade minimum amount of account value
    Strategy 3 allowed to trade minimum amount of account value

    in this example Strategy 1 won best performance and is allowed to trade 1/18th of the of total Account Value. Strategies 2 & 3 Lost so they are only allowed to trade the minimum allowed (1000 units from www.forex.com)

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello GTBrooks,

    I understand part of your message however you linked to AddBar which is for BarsTypes and I am not certain what you mean by the following:
    Enabled conveying performance metrics (https://ninjatrader.com/support/help...t8/?addbar.htm) broken out by strategy / instrument.
    For accessing strategies to read a value from them, you can use the following example: https://ninjatrader.com/support/help...es_account.htm

    We don't have a specific sample of sharing data with a strategy from an addon, the closest to that would be the above linked sample where you access the strategy instance to read a value. That sample could also be used to set a custom property of a strategy however you would need to cast the StrategyBase as the correct type to access its properties. .

    To create a value that your addon shares with the strategy, you would need to use C# structure here and make what you need for whatever needs to be shared. If you are not sure on how to share data between objects or instances in C# or how to access properties of objects, this is a good time to review object oriented programming tutorials for C# from external education materials as that will be used here.



    I look forward to being of further assistance.





    Leave a comment:


  • GTBrooks
    replied
    I would need a reference for each Individual strategies Enabled conveying performance metrics (https://ninjatrader.com/support/help...t8/?addbar.htm) broken out by strategy / instrument.
    I would also need to know how to create a value (Set Value) in the AddOn to return the Value for the strategies to look for a (Get Value).

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello GTBrooks,

    What part of this idea do you need help with specifically?

    Are you asking how to access the account to get the available balance?


    I look forward to being of further assistance.

    Leave a comment:


  • List strategies /w performance for use in a return for the strategy to reference

    AddOn would preferably looks like Market Analyzer , but instead of instrument it would be current strategies enabled to trade.


    Individual strategies performance metrics for use in competition distribution of account funds & account fund held in reserve using another AddOn.
    Strategy performance metric from strategy to AddOn. Competitive comparison for strategies competition over account value allotment.

    The AddOn would need a double value return for the strategy to use to know how much of the accounts funds are authorized to trade.

Latest Posts

Collapse

Topics Statistics Last Post
Started by philmg, Today, 01:17 PM
0 responses
4 views
0 likes
Last Post philmg
by philmg
 
Started by cre8able, Today, 01:01 PM
1 response
6 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by manitshah915, Today, 12:59 PM
1 response
3 views
0 likes
Last Post NinjaTrader_Erick  
Started by ursavent, Today, 12:54 PM
1 response
4 views
0 likes
Last Post NinjaTrader_Jesse  
Started by Mizzouman1, Today, 07:35 AM
3 responses
17 views
0 likes
Last Post NinjaTrader_Gaby  
Working...
X