Strategy Condition Logic >> my wetware - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Strategy Condition Logic >> my wetware
Started:May 22nd, 2010 (11:51 PM) by Trader.Jon Views / Replies:971 / 2
Last Reply:May 24th, 2010 (04:17 PM) Attachments:0

Welcome to

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

Thread Tools Search this Thread

Strategy Condition Logic >> my wetware

Old May 22nd, 2010, 11:51 PM   #1 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
Trader.Jon's Avatar
Posts: 500 since Jul 2009
Thanks: 401 given, 172 received

Strategy Condition Logic >> my wetware


I am trying to add this type of condition to the condition 'if' statement of the strategy, and while it does compile, there are no results generated when running a backtest:

SwingGap.SwingHigh [0] - SwingGap.SwingLow [0] > 14

In other words I dont want to take a trade if the range between the current swing high and low is less that a predetermined amount. Sorry, I am typing from a computer where the strategy is not installed: I can post the rest of the code later if it is helpful.

I have tried private boll statements but it is not accepted that way either. I must be missing a step that is obvious to some ... not to me though.

Can someone please help me out?


Reply With Quote
The following user says Thank You to Trader.Jon for this post:

Old May 22nd, 2010, 11:51 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.


Old May 24th, 2010, 04:17 PM   #3 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
Posts: 449 since Jun 2009
Thanks: 1,342 given, 376 received

It might take more parentheses or creating a double value of the High-Low


if ((SwingGap.SwingHigh [0] - SwingGap.SwingLow [0]) > 14)
do whatever you want here

private double diff = 0;
diff = SwingGap.SwingHigh [0] - SwingGap.SwingLow [0];
if (diff > 14)
not tested...good luck

Reply With Quote
The following user says Thank You to zeller4 for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Strategy Condition Logic >> my wetware

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
BLUELINE DELIGHT >>>Intraday Trading Strategy Guide<<< Gabriyele The Elite Circle 407 May 30th, 2013 07:29 AM
How to connect NinjaTrader7 --> MySQL --> R(2.12) Justin300 Matlab, R project and Python 5 December 10th, 2011 10:52 AM
First Indicator programing, Text on graph >> Easy language / Multicharts arjfca The Elite Circle 2 September 22nd, 2010 09:05 PM
TIP : Search for free NinjaTrader Indicator on BMT ? >> How to use our searchtools ! max-td Beginners and Introductions 2 July 19th, 2010 06:16 AM
Jobs for musicians, DJs, coder, salesman >> Native Instruments Berlin + L.A. max-td Off-Topic 1 March 18th, 2010 09:43 AM

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

Copyright © 2016 by 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 2016-10-23 in 0.09 seconds with 20 queries on phoenix via your IP