Problem coding a strategy with LinRegSlopeSFX - NinjaTrader Programming | futures.io
futures.io futures trading


Problem coding a strategy with LinRegSlopeSFX
Started:August 5th, 2016 (06:53 AM) by stoicbuddha Views / Replies:145 / 3
Last Reply:August 5th, 2016 (07:44 AM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Problem coding a strategy with LinRegSlopeSFX

Old   #1 (permalink)
Elite Member
Seattle, WA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: AMP/CQG
Favorite Futures: ES, NQ, CL
 
stoicbuddha's Avatar
 
Posts: 69 since Feb 2012
Thanks: 197 given, 52 received

Problem coding a strategy with LinRegSlopeSFX

I'm writing code that sends an alert when the LinRegSlopeSFX indicator crosses its "zero" line, but I've had a frustrating time coding the CrossAbove/Below if statement. Here's what I have so far:

if ((CrossAbove(LinRegSlopeSFX(False, 16, 1).SlopeSFX, 0, 1) || CrossBelow(LinRegSlopeSFX(False, 16, 1).SlopeSFX, 0, 1)) && (!Historical))
{}

when i try compiling it, it tells me "the name False does not exist in the current context". I'm sure there's something simple I'm missing. I figured I don't have to add the Indicator in the code as the indicator provides SlopeSFX in a public DataSeries. Can someone help here?

Thanks!

Reply With Quote
 
Old   #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.

 
Old   #3 (permalink)
Elite Member
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 935 since Aug 2009
Thanks: 746 given, 1,291 received



happyrenko View Post
I'm writing code that sends an alert when the LinRegSlopeSFX indicator crosses its "zero" line, but I've had a frustrating time coding the CrossAbove/Below if statement. Here's what I have so far:

if ((CrossAbove(LinRegSlopeSFX(False, 16, 1).SlopeSFX, 0, 1) || CrossBelow(LinRegSlopeSFX(False, 16, 1).SlopeSFX, 0, 1)) && (!Historical))
{}

when i try compiling it, it tells me "the name False does not exist in the current context". I'm sure there's something simple I'm missing. I figured I don't have to add the Indicator in the code as the indicator provides SlopeSFX in a public DataSeries. Can someone help here?

Thanks!

False should not be capitalized (i.e. false)
p.s I did not put this into NT to see if it has the correct parameters but just by looking, the misspelling of False will give that error.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
The following user says Thank You to DavidHP for this post:
 
Old   #4 (permalink)
Elite Member
Seattle, WA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: AMP/CQG
Favorite Futures: ES, NQ, CL
 
stoicbuddha's Avatar
 
Posts: 69 since Feb 2012
Thanks: 197 given, 52 received


DavidHP View Post
False should not be capitalized (i.e. false)
p.s I did not put this into NT to see if it has the correct parameters but just by looking, the misspelling of False will give that error.

That did it, I can't believe it was that simple!

Thanks!

Reply With Quote

Reply



futures.io > > > > > Problem coding a strategy with LinRegSlopeSFX

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

Bookmap New Indicator Panel, Cumulative Delta, Order Flow demo

Jan 17

An Afternoon with FIO member Massive I

Elite only

Leo Murphy: Making sense of Technical Analysis and Random Walk

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
RFQ for coding strategy in Multicharts samsam1231 MultiCharts 1 November 20th, 2015 05:47 PM
New Strategy Coding Help FatDemon NinjaTrader Programming 49 January 4th, 2013 01:34 AM
Strategy Coding Challenge MWinfrey NinjaTrader Programming 4 January 25th, 2011 06:12 PM
Strategy coding - Would Anyone please take a quick look at........ mdsvtr NinjaTrader Programming 4 November 5th, 2010 06:54 AM
Strategy Wizard Coding Question njaisson NinjaTrader Programming 8 October 6th, 2010 08:34 AM


All times are GMT -4. The time now is 08:57 AM.

no new posts
Page generated 2017-01-16 in 0.10 seconds with 19 queries on phoenix via your IP 50.16.5.192