NexusFi: Find Your Edge


Home Menu

 





Convertinb Double to DataSeries


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 
patbateman's Avatar
 patbateman 
NY, NY
 
Experience: None
Platform: T4, NinjaTrader
Trading: All!
Posts: 235 since Mar 2012
Thanks Given: 113
Thanks Received: 201

I'm trying to use some indicators used for price, such as the CurrentOHL, on an indicator. Unfortunately OHL will not do indicators because it's designed for a dataseries.

I'm wondering if it's possible to convert a normal double indicator into a dataseries, and feed it into OHL? I looked at the source for the CurrentOHL, and it clearly is designed for a dataseries only, and not a double value.


"A Jedi's strength flows from the force."
-Yoda
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
SEC Advisory Committee Backs Tokenized Securities Exempt …
Traders Hideout
The Week Ahead -- CPI Wednesday With Oil Past $90, PPI L …
Traders Hideout
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
More Than Capable: Hegseths War Warning Validates $114M …
Prediction Markets & Event Contracts
UCL Final Kicks Off at Noon ET: PSG at 56.5% as Iran May …
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
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845

Not sure I am clearly understanding what you asking, but all indicators are called the same, you can do either,

Output[0] = InputIndicator(parameters)[0];
or
double Output = InputIndicator(parameters)[0];

the only difference is if you want to evaluate prior bars on Output then you have to create a dataseries, for example you can do,

Output[0] = InputIndicator(parameters)[0];
Offset2Bars[0] = Output[2];

but you can't do,

double Output = InputIndicator(parameters)[0];
Offset2Bars[0] = Output[2];

If you aren't sure how to call another indicator then you can open the strategy wizard and use the indicator in a formula then view the code to see which parameters are included and the order they are used.


Reply With Quote
Thanked by:
  #3 (permalink)
 
patbateman's Avatar
 patbateman 
NY, NY
 
Experience: None
Platform: T4, NinjaTrader
Trading: All!
Posts: 235 since Mar 2012
Thanks Given: 113
Thanks Received: 201



vegasfoster View Post
Not sure I am clearly understanding what you asking, but all indicators are called the same, you can do either,

Output[0] = InputIndicator(parameters)[0];
or
double Output = InputIndicator(parameters)[0];

the only difference is if you want to evaluate prior bars on Output then you have to create a dataseries, for example you can do,

Output[0] = InputIndicator(parameters)[0];
Offset2Bars[0] = Output[2];

but you can't do,

double Output = InputIndicator(parameters)[0];
Offset2Bars[0] = Output[2];

If you aren't sure how to call another indicator then you can open the strategy wizard and use the indicator in a formula then view the code to see which parameters are included and the order they are used.

So InputIndicator(parameters) is where the indicator would go? I'll give this a shot, it looks promising.

What I'm trying to do is convert an indicator to a dataseries, so the CurrentDayOHL will tell me the Open and the Close of an indicator.


"A Jedi's strength flows from the force."
-Yoda
Started this thread Reply With Quote
  #4 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845


patbateman View Post
So InputIndicator(parameters) is where the indicator would go? I'll give this a shot, it looks promising.

What I'm trying to do is convert an indicator to a dataseries, so the CurrentDayOHL will tell me the Open and the Close of an indicator.

I understand better, I don't have NT installed anymore so I couldn't try it, but I don't think you have to create a new dataseries, simply replace Open[0], High[0] and Low[0] with your indicator call and that should work.


Reply With Quote
Thanked by:




Last Updated on October 10, 2012


© 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