NexusFi: Find Your Edge


Home Menu

 





Other MarketData


Discussion in NinjaTrader

Updated
    1. trending_up 2,170 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
mate41
Paris/France
 
Posts: 4 since Sep 2011
Thanks Given: 1
Thanks Received: 0

Hi guys,
i don't like this OnMarketData from NT.
There is an other one, runs perfectly in an OnBarUpdate() and there is no need for an OnMarketData method.
But i don't know where it come from.

 
Code
cur_Ask = MarketData.Ask.Price;
cur_Bid = MarketData.Bid.Price;
cur_Last = MarketData.Last.Price;
close_Pr_Day = MarketData.LastClose.Price;
cur_.... are personal variables and i use close_Pr_Day as the close of the previous day.

 
Code
if ( BarsInProgress == 0 && FirstTickOfBar)
            {
                close_Pr_Day = MarketData.LastClose.Price;        //call it only once and store it in close_Pr_Day
                
            }
However this don't work:
 
Code
day_Open = MarketData.Opening.Price;
Any idea ??


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
US Navy Blockade of Hormuz Starts Today -- Oil Surges 8p …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
mate41
Paris/France
 
Posts: 4 since Sep 2011
Thanks Given: 1
Thanks Received: 0


Seriously nobody has heard of it ??


Reply With Quote
  #4 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,715 since May 2010
Thanks Given: 203
Thanks Received: 2,688

The MarketData property is not supported NinjaScript so there is no expected behaviour. It is also possible that this property could be null so you should check for null object before accessing it. The opening price property may or may not be set depednant on what information we receive via the market data/broker provider API.


Follow me on X Reply With Quote
  #5 (permalink)
mate41
Paris/France
 
Posts: 4 since Sep 2011
Thanks Given: 1
Thanks Received: 0

I know it's not supported. It works for me as it has to do except the OPEN price.
My question was if anyone knows anything about where it come from.


Reply With Quote




Last Updated on December 20, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts