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

Two strategies live at the same time

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

    Two strategies live at the same time

    hi i have two strategies, both have multiple time frames and multiple instruments. one is long and the other is short. they are both essentially opposite of one another.

    one of the variables i have under OBU is to calculate profit loss on positions[0]profitloss and positions[1]profitloss. and based on this variable i make a decision for strategy A.

    now in strategy B i have the same variable but it is opposite of strategy A. for some reason in strategy B the variable is not calculating correct. could it be because positions[0]p&L is not being calculated corrected bc this paticular symbol is already ''live'' in strategy A?

    for example is each strategy able to work it's calculations independently or can they be causing noise to each other?

    update-

    yea for some strange reason each individual strategy is not able to isolate it's orders but it's rather looking at other live positions that were not activated by the strategy. how can i isolate each strategy to only look at orders that it creates? i have different entries and exit names in each strategy..

    Positions[0].GetProfitLoss(GetCurrentBid(0),PerformanceUnitCur rency); this variable is in both strategy. one strategy is long and one strategy is short. It's the same symbol for both strategy. At a moment when both strategies have executed the order. it seems the above variable in each individual strategy is being calculated on both positions that were executed by each strategy. i hope this makes sense,,
    Last edited by staycool3_a; 10-20-2014, 07:58 PM.

    #2
    Hello,

    Thank you for the question.

    For each strategy they would be considered their own instance so each strategy is isolated and is un aware of and can not affect another strategy.

    Can you please provide an example script to show what you are experiencing?

    Also can you please detail exactly what you are trying to achieve with the logic in the script so we can see exactly what is happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by lightsun47, Today, 03:51 PM
    0 responses
    5 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    9 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    45 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    9 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X