how do i code the last n closes on a indicator? - NinjaTrader Programming | futures io social day trading

how do i code the last n closes on a indicator?
 Updated: May 6th, 2012 (05:34 PM) Views / Replies: 710 / 7 Created: May 4th, 2012 (11:36 PM) by ceramictilepro Attachments: 2

 Welcome to futures io.

# how do i code the last n closes on a indicator?

Elite Member
Roseville CA

Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES

Posts: 124 since Jun 2009

how do i code the last n closes on a indicator?

Hello,

using a std stochastics indicator,

I am trying to create a code that will draw an arrow if:

Code
 `the last 8 closes of the stochastics are above 90`
I am not looking for the last 8 closes of price just to be more clear.

Thank you for any help

 May 4th, 2012, 11:36 PM #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.

Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500

Posts: 46,240 since Jun 2009

I am a bit rusty, but I will try. I don't remember the Stochastic and DrawArrow overloads, but here is general idea

bool myArrowCondition = false;

if (Lowest(Stochastic(C, 1.618, 20), 8)[0] > 90) myArrowCondition = true;

if (myArrowCondition) DrawArrowUp(blah)

Mike

 The following user says Thank You to Big Mike for this post:

Elite Member
Roseville CA

Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES

Posts: 124 since Jun 2009

Big Mike
 I am a bit rusty, but I will try. I don't remember the Stochastic and DrawArrow overloads, but here is general idea bool myArrowCondition = false; if (Lowest(Stochastic(C, 1.618, 20), 8)[0] > 90) myArrowCondition = true; if (myArrowCondition) DrawArrowUp(blah) Mike

is "Lowest" acceptable?
"lowest bar" is available but that is for price I believe.

getting an error with "Lowest"

Code
 ```#region Variables bool myArrowCondition = false;```

Code
 ```if (Lowest(aDoubleStochsdot(10),8).K[0] > 90) myArrowCondition = true; if (myArrowCondition) { DrawArrowDown("My down arrow2" + CurrentBar, false, 0, High[0] + 5 *TickSize, Color.Black); }```
thank you

Market Wizard
virginia

Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES

Posts: 5,220 since Jun 2009
Forum Reputation: Legendary

ceramictilepro
Hello,

using a std stochastics indicator,

I am trying to create a code that will draw an arrow if:

Code
 `the last 8 closes of the stochastics are above 90`
I am not looking for the last 8 closes of price just to be more clear.

Thank you for any help

since you want to work with stoch the first thing you should do is making a copy of ninja stoch then work from there

Attached Thumbnails

Attached Files
 The following user says Thank You to cory for this post:

 The following user says Thank You to Zondor for this post:

Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500

Posts: 46,240 since Jun 2009

Sorry, the NinjaTrader equivalent of Lowest is MIN. Told you I was rusty!

Mike

Elite Member
Roseville CA

Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES

Posts: 124 since Jun 2009

Big Mike
 Sorry, the NinjaTrader equivalent of Lowest is MIN. Told you I was rusty! Mike

ha...np mike

 futures io > how do i code the last n closes on a indicator?

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

Elite only

Elite only

Jan 18

Jan 23

Elite only

Elite only

## Ran Aroussi: TBA

Elite only

 Similar Threads Thread Thread Starter Forum Replies Last Post ttmarok ThinkOrSwim Programming 25 March 3rd, 2014 09:42 PM hector24 NinjaTrader 4 November 12th, 2012 05:45 PM Crassius Platforms and Indicators 4 February 24th, 2011 03:34 PM daveste99 EasyLanguage Programming 5 September 14th, 2010 03:09 PM spinnybobo NinjaTrader Programming 4 May 26th, 2010 04:54 AM

All times are GMT -4. The time now is 11:39 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-17 in 0.11 seconds with 20 queries on phoenix via your IP 54.221.73.186