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

Prices on Secondary price bars not consistent issue

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

    Prices on Secondary price bars not consistent issue

    Scenario:

    I have found inconsistency when plotting values from higher time frames on smaller time frames...most likely a knowledge gap perhaps? To make this easoer to explain i have had to illustrate a number of scenarios completing with the actual query area.
    Thank you in advance for your time :-)

    Plotting higher time frame Intraday values on trading time frame Intraday data series
    2 charts GBPUSD 60Min, 10Min
    5 EMA on 60Min Chart = Close[0]=150779
    5 EMA on 10Min Chart with Secondary bars of period/type 60Min, Close[0]=150779
    The last value from the 60Min close is carried for 6 10 bar intervals.
    Fantastic that is great....you get a stepped series of lines....Just what is required.

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    HTF secondary bars code used:
    init{
    Add(PeriodType.Min,60);
    }

    protectedoverridevoid OnBarUpdate()
    {
    if((CurrentBar<1) || (BarsInProgress == 1)) return;
    Value.Set(EMA(Closes,5)[0]);
    }

    }
    Works great: Plotting this on a 60Min chart gives identical results to just using a EMA(GBPUSD 60MIN CLOSE, 5) as a test.

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    #Scenario 2
    2 charts GBPUSD Daily, 60Min
    Intraday to Daily
    5 EMA on 1 Day - 365 days Chart = Close[0]=151420
    5 EMA on 60Min Chart with Secondary bars of period/type 1 Day, Close[0]=151420
    Great!
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

    All synced - the last daily close is plotted on todays trading time frame - this is as expected today has not closed yet....

    #Scenario 3
    2 charts GBPUSD Weekly, 60Min
    Intraday to Weekly
    5 EMA on 1 Weekly - 365 days Chart = Close[0]=14922
    5 EMA on 60Min Chart with Secondary bars of period/type 1 Week, Close[0]=14912

    Cannot get them to sync... i am thinking that that the last closed week value should be plotted...
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.



    #Scenario 4
    2 charts GBPUSD Weekly, Daily
    Daily to Weekly
    5 EMA on 1 Weekly - 365 days Chart = Close[0]=14922
    5 EMA on Daily Chart with Secondary bars of period/type 1 Week, Close[0]=14922
    GREAT
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    I have not experimented with monthly as yet

    THE QUESTION:
    Scenario 3 does not work as expected...any ideas how this can be resolved?
    intraday to weekly -does not return the same values.
    Using Weekly values is actually the most important thing here from a tehcnical analysis stand point for my studies. I need to able to call the values of weekly dynamic support and resistance from a lower intraday time frame - this is not yet an accurate process. In other words the weekly charts says x but calling the same calculationg from a intraday timse series say weekly = y not x....
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    #2
    Ok this is a retorical post i have found the answer lie within making sure that the charts have the same number of days for the data. so for example if the weekly chart had 3000 days the 60min needs it too - to get the same results...:-)
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    32 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    4 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    6 views
    0 likes
    Last Post cre8able  
    Started by Haiasi, Today, 06:53 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X