NexusFi: Find Your Edge


Home Menu

 





price type code for indicatos


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one traderTX with 6 posts (0 thanks)
    2. looks_two traderwerks with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 eDanny with 1 posts (2 thanks)
    1. trending_up 3,552 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 7 posts
    2. attach_file 2 attachments




 
Search this Thread

price type code for indicatos

(login for full post details)
  #1 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47

hi,
most of my programming experience was back in engineering school doing fortran.
so i have heard programming got alot easier since those days.

so is it possibel to explain step by step in detail to a newbie like me how to put the price type parameter in an indicator like the stochastics that comes with ninja or the stochastics_with smoothing which is available for download on the ninja_support site?

is it as simple as going to the editor in the ninja control center and opening the indicator and sticking some code in there OR could it be done with the ninja indicator wizard?

thanks

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Tradestation historical data to be used in NinjaTrader 8
Platforms and Indicators
Do 5-days or 7-days constitute a Multiweek Channel?
Currencies
Optimal Futures Trading Workflow
Platforms and Indicators
Any experience with Affordable Indicators - Duplicate Ac …
Trading Reviews and Vendors
PowerLanguage/EasyLanguage Trying to use a Function as a …
EasyLanguage Programming
 

(login for full post details)
  #3 (permalink)
 
eDanny's Avatar
 eDanny 
East Rochester, NY
 
Experience: Intermediate
Platform: NT
Posts: 329 since Jul 2009
Thanks Given: 18
Thanks Received: 425


Try this. Open the Stochastics indicator for editing. Right click and Save As a different name. Add this in the Initialize section:

PriceTypeSupported = true;

Then look for this line:

nom.Set(Close[0] - MIN(Low, PeriodK)[0]);

and change the Close[0] to Input[0] so it looks like this:

nom.Set(Input[0] - MIN(Low, PeriodK)[0]);

Then right click, select compile, click OK and close the editor. Load the indicator on your chart and test it. Dan

Reply With Quote
The following 2 users say Thank You to eDanny for this post:
(login for full post details)
  #4 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47

Thank you eDanny, worked on the Stochastics and Stochastics with Smoothing indicators.

i have been trying duplicate the stochastics on another charting software, Ensign, that i use. Ensign has a little different terminology for the stochastics. but i think i have all the parameters set correct. i have them close now but still something is not quite the same...

Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47

hi eDanny,
does the code you mention in your post to me work for both Ninja 7 and 6.5 ?
i will give it a try..

ok, it seems to have worked ok with the "stochastics" indicator , that is compiled ok on ninja 7.
but the stochasticswithsmoothing indicator gives an error on compiling. even though i saved the indicator as stochasticswithsmoothing2, and only changed lines in the copy i saved.
neither stochasticswithsmoothing indicator will now compile.
perhaps because it wasnt converted to ninja7?

Trade what you see, not what you think.

"The better the mechanic, the fewer the tools"

"Futures Trading is risky and can cause substantial financial gain"
Started this thread Reply With Quote
(login for full post details)
  #6 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47





here is what the error looks like after compiled.
do you know how to fix it ?

Trade what you see, not what you think.

"The better the mechanic, the fewer the tools"

"Futures Trading is risky and can cause substantial financial gain"
Started this thread Reply With Quote
(login for full post details)
  #7 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47

here is a snapshot of the indicator with the error message.
i didnt realize the original didnt have an error message.

Trade what you see, not what you think.

"The better the mechanic, the fewer the tools"

"Futures Trading is risky and can cause substantial financial gain"
Attached Thumbnails
Click image for larger version

Name:	stochasticssmoothing2.JPG
Views:	166
Size:	106.2 KB
ID:	121450  
Started this thread Reply With Quote
(login for full post details)
  #8 (permalink)
 
traderTX's Avatar
 traderTX 
pittsburgh, pa
 
Experience: Intermediate
Platform: Ninjatrader, ensign, wave59
Broker: IB , AMP/ cqg
Trading: ES, CL
Posts: 154 since Mar 2010
Thanks Given: 54
Thanks Received: 47

on the line 150, i had to change the MA_Type to MA_Type2
Thanks to Ninja support CAL.
then it compiled,
and i was able to add the two lines so that types of price type , hi, lo, close, open, median could be used to calc the indicator.

Trade what you see, not what you think.

"The better the mechanic, the fewer the tools"

"Futures Trading is risky and can cause substantial financial gain"
Started this thread Reply With Quote





Last Updated on August 22, 2013


© 2023 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