Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame and Bars Array

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

    Multiple Time Frame and Bars Array

    I am trying to trade from a MNQ chart using the price and indicator values from the NQ.
    MNQ is the primary series and NQ is the secondary series

    Question 1

    Will the code below reference the ADX indicator from the NQ and enter a trade on the MNQ?

    if ((BarsInProgress == 1)
    && (ADX1[0] < AdxValue))

    EnterLong(Convert.ToInt32(Contracts), Convert.ToString(EntryNameDtv));


    I was trying to use BarsArray under the primary series but was getting error messages compiling. I must not have defined the series properly.
    "ADX1 is a field but is used like a method"

    if ((BarsInProgress == 0)
    && (ADX1(BarsArray[1])[0] < AdxValue))

    I have reviewed the help guide on multiple time frames but I am missing something.

    I have been successful using an NQ chart as primary and entering the trades on the MNQ.
    But I would like to be able to see the indicators and manage the trade on one chart.
    Currently the indicators are on the NQ chart but if I want to manage the exit I have to do it on the MNQ chart.

    #2
    Hello sdauteil,

    Thank you for your post.

    You would have to specify the bars array to be used for the ADX when you assign the instance of it in State.DataLoaded for it to be calculated on the secondary NQ series:

    else if (State == State.DataLoaded)
    {
    ADX1 = ADX(BarsArray[1], myPeriod);

    }

    The issue would be that AddChartIndicator() will only work with indicators being plotted on the primary data series you have in your chart. So you could use the additional data series for the indicator for calculating your strategy logic, but you wouldn't be able to correctly add that to the chart from the strategy.

    You could add that data series within the hosted indicator, add that data series to the strategy as well, and have the indicator calculate on secondary data series and plot on primary.

    There's a note in our help guide regarding this:



    Please let us know if we may be of further assistance to you.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    71 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X