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


Problem coding a strategy with LinRegSlopeSFX
Started: by stoicbuddha Views / Replies:168 / 3
Last Reply: 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

  #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: 72 since Feb 2012
Thanks: 212 given, 59 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
 
  #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
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: 943 since Aug 2009
Thanks: 753 given, 1,299 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:
 
  #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: 72 since Feb 2012
Thanks: 212 given, 59 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)
 

Mastering Trading Pysychology w/Brett Steenbarger & Trading Technologies

Elite only

PTMC Protrader Platform First Look w/Sergey Sokolov

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

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


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

no new posts
Page generated 2017-03-24 in 0.08 seconds with 19 queries on phoenix via your IP 54.145.183.43