NexusFi: Find Your Edge


Home Menu

 





How to have value show in data series?


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 stearno 
Muscat, Oman
 
Experience: Intermediate
Platform: Ninja and MT4
Trading: Forex
Posts: 15 since Apr 2012
Thanks Given: 4
Thanks Received: 3

I am new to NT7 code. I have this indicator that shows divergence based upon Momentum and draws lines on chart. But I want it to show a value in the data series, so I can have it do alerts in Market Analyzer and maybe someday in Strategies. How can I assign a value to kdbuy and kdsell in the attached. I tried to do it after looking at other strategies, but it did not work. I appreciate the advice.

Attached Files
Elite Membership required to download: MomDivergence.cs
Elite Membership required to download: MomMomentum.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
volume profile
Platforms and Indicators
How to plot a custom icon for crossover
NinjaTrader
Is there a way to simulate CONTINUOUS CONTRACT?
NinjaTrader
Topstep experience and review
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
ApexTraderFunding.com experience and review
144 thanks
1 Minute Man
64 thanks
HumbleTraders next chapter
40 thanks
Winning attitudes create winning traders
32 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
25 thanks
  #3 (permalink)
 stearno 
Muscat, Oman
 
Experience: Intermediate
Platform: Ninja and MT4
Trading: Forex
Posts: 15 since Apr 2012
Thanks Given: 4
Thanks Received: 3


Okay, I figured it out. I had said DataSeries, but I meant Data Box. Once I figured out I was calling it the wrong thing, and searched for the correct term, then I found more resources.

I was assigning variables to both public and private classes, which was a mistake. I now fixed it:

I removed all the assignments at the top in the variables region and in the OnIntialize region.

I kept at the bottom Properties region where I declared the public classes for the variables and assigned them to the Values[1] and Values[2]. Then, when I wanted to assign the price to this variable in the actual code, I used "Values[1].Set(Close(0))" and "Values[2].Set(Close(0))". Very simple coding after I figured it out.

-Stearno

Attached Files
Elite Membership required to download: MomDivergence.cs
Started this thread Reply With Quote




Last Updated on October 29, 2014


© 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