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


Problem coding a strategy with LinRegSlopeSFX
Updated: Views / Replies:205 / 3
Created: by stoicbuddha 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: 73 since Feb 2012
Thanks: 220 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: 949 since Aug 2009
Thanks: 755 given, 1,317 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: 73 since Feb 2012
Thanks: 220 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)

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

May
 

EasyLanguage ABC's: Mastering TradeStation Programming w/Chris Kaiser

Elite only
 

Prototyping Python Strategies (part 2: Backtesting) w/Ran Aroussi

Elite only
 

Portfolio Diversification w/Brendon Delate @ Diversify Portfolio

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

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 11:40 AM.

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-05-22 in 0.08 seconds with 19 queries on phoenix via your IP 54.162.19.123