NexusFi: Find Your Edge


Home Menu

 





Convertinb Double to DataSeries


Discussion in NinjaTrader

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




 
Search this Thread

Convertinb Double to DataSeries

  #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: 200

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?
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 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: 844

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: 200



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: 844


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts