A little programming help plz - NinjaTrader Programming | futures io social day trading
futures io futures trading


A little programming help plz
Updated: Views / Replies:5,458 / 31
Created: by mpe66 Attachments:6

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 6  
 
Thread Tools Search this Thread
 

A little programming help plz

  #1 (permalink)
Elite Member
Sweden
 
Futures Experience: Intermediate
Platform: NinjaTrader
 
Posts: 49 since Mar 2010
Thanks: 29 given, 12 received

A little programming help plz

I'm trying to create a VWAP Oscillator in NT7 and thought I'd use the NT indicator Volume Oscillator as a template.
The Volume Oscillator code looks like this:

{
Value.Set(SMA(Volume, Fast)[0] - SMA(Volume, Slow)[0]);
}

I need to have my indicator calculate:

((Current Price) - (VWAP plot of VWAP indicator)) / (("SD1 Upper" plot of VWAP indicator) - (VWAP plot of VWAP indicator))

Which I thought would be:

{
Value.Set (((Close[0]) - (VWAP.WVAP[0])) / ((VWAP.SD1 Upper[0]) - (VWAP.VWAP[0])));
}

But I get a bunch of errors like ) expected and statement expected. Can anyone see where I went wrong? Would the "SD1 Upper" plot of VWAP indicator be VWAP.SD1 Upper[0]?

I'm obviously no programming savant and would appreciate all help on this,

Mpe

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received


Ther is no space in the name of the DataSeries - it should be:
SD1Upper (no space)

Reply With Quote
 
  #4 (permalink)
Elite Member
Sweden
 
Futures Experience: Intermediate
Platform: NinjaTrader
 
Posts: 49 since Mar 2010
Thanks: 29 given, 12 received


gregid View Post
Ther is no space in the name of the DataSeries - it should be:
SD1Upper (no space)

Thanks, that fixed the errors. But I get new ones when I try to compile, "NinjaTrader.Indicator.Indicator.VWAP() is a method which is not valid in the given context."

Any thoughts one this one?



Reply With Quote
 
  #5 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

Posting original VWAP indicator might help.

For now: are you sure there is a dataseries like VWAP in the original indicator? The indicator I've seen has VWAPLine as the name of the main plot. Try replacing VWAP[0] with VWAPLine[0]

Reply With Quote
 
  #6 (permalink)
Elite Member
Orlando, Florida
 
Futures Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Favorite Futures: ES
 
Posts: 56 since Aug 2010
Thanks: 3 given, 66 received


mpe66 View Post
I'm trying to create a VWAP Oscillator in NT7 and thought I'd use the NT indicator Volume Oscillator as a template.
The Volume Oscillator code looks like this:

{
Value.Set(SMA(Volume, Fast)[0] - SMA(Volume, Slow)[0]);
}

I need to have my indicator calculate:

((Current Price) - (VWAP plot of VWAP indicator)) / (("SD1 Upper" plot of VWAP indicator) - (VWAP plot of VWAP indicator))

Which I thought would be:

{
Value.Set (((Close[0]) - (VWAP.WVAP[0])) / ((VWAP.SD1 Upper[0]) - (VWAP.VWAP[0])));
}

But I get a bunch of errors like ) expected and statement expected. Can anyone see where I went wrong? Would the "SD1 Upper" plot of VWAP indicator be VWAP.SD1 Upper[0]?

I'm obviously no programming savant and would appreciate all help on this,

Mpe

I don't have the VWAP indicator, so it's a little difficult to tell for sure. Some possibilities:

{
Value.Set (((Close[0]) - (VWAP.WVAP[0])) / ((VWAP.SD1 Upper[0]) - (VWAP.VWAP[0])));
}

Most indicators require parameters. Are you sure you aren't supposed to pass some parameters to the indicator? (ie. VWAP(Period).VWAP[0])

Reply With Quote
 
  #7 (permalink)
Elite Member
paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 60 since Oct 2009
Thanks: 1 given, 53 received

hi,

Current Price= Close[0]

VWAP plot of VWAP indicator = VWAP().VWAPLine[0]

SD1 Upper" plot of VWAP indicator = VWAP().SD1Upper[0]

SD1 Lower" plot of VWAP indicator = VWAP().SD1Lower[0]

etc...

Reply With Quote
 
  #8 (permalink)
Elite Member
Sweden
 
Futures Experience: Intermediate
Platform: NinjaTrader
 
Posts: 49 since Mar 2010
Thanks: 29 given, 12 received

I'm using the indicator from post 258 in this thread on the NT forum. I'm pretty sure the name of the plot is just VWAP or at least that's what it's called in the indicator settings. As for parameters there are couple. Start time, end time, Accuracy warning (true/false), Std Dev calc mode ( VWAP/VWAPavg) etc. Would I need to insert all that in my script?

Reply With Quote
 
  #9 (permalink)
Elite Member
Orlando, Florida
 
Futures Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Favorite Futures: ES
 
Posts: 56 since Aug 2010
Thanks: 3 given, 66 received


mpe66 View Post
I'm using the indicator from post 258 in this thread on the NT forum. I'm pretty sure the name of the plot is just VWAP or at least that's what it's called in the indicator settings. As for parameters there are couple. Start time, end time, Accuracy warning (true/false), Std Dev calc mode ( VWAP/VWAPavg) etc. Would I need to insert all that in my script?

Yes. It should look something like this:

VWAP(startTime,endTime,true.... )[0]

or

VWAP(startTime,endTime,true.... ).SD1Upper[0]

Reply With Quote
 
  #10 (permalink)
Elite Member
Sweden
 
Futures Experience: Intermediate
Platform: NinjaTrader
 
Posts: 49 since Mar 2010
Thanks: 29 given, 12 received



MooreTech View Post
Yes. It should look something like this:

VWAP(startTime,endTime,true.... )[0]

or

VWAP(startTime,endTime,true.... ).SD1Upper[0]

Ok I tried inputting all the settings and got:

Value.Set (((Close[0]) - (VWAP(00:00:00, 00:00:00, False, True, VWAP,1).VWAP[0])) / ((VWAP(00:00:00, 00:00:00, False, True, VWAP,1).SD1Upper[0]) - (VWAP(00:00:00, 00:00:00, False, True, VWAP,1).VWAP[0])));

But get a bunch of errors. It doesn't seem to like ":" and expects a bunch of ";".

Reply With Quote

Reply



futures io > > > > > A little programming help plz

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Programming (programming without coding) LukeGeniol Platforms and Indicators 11 September 16th, 2016 01:49 PM
Help with programming concept r3algood NinjaTrader Programming 3 July 30th, 2011 04:21 AM
Indicator programming Mondrakete NinjaTrader Programming 3 April 3rd, 2011 02:02 PM
HELP with understanding this FORMULA plz.... mdsvtr Currency Futures 1 February 11th, 2011 10:11 PM
HELP with RECOMMENDING a Ninja Script Consultant plz... mdsvtr Trading Reviews and Vendors 3 November 6th, 2010 11:12 AM


All times are GMT -4. The time now is 10:10 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-16 in 0.14 seconds with 20 queries on phoenix via your IP 54.227.51.103