Can't Compile! - NinjaTrader Programming | futures io social day trading
futures io futures trading


Can't Compile!
Updated: Views / Replies:1,359 / 5
Created: by sdt929 Attachments:2

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Can't Compile!

  #1 (permalink)
Elite Member
Dallas, Texas
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: Amp/CQG
Favorite Futures: CL,ZB,TF
 
sdt929's Avatar
 
Posts: 17 since Sep 2009
Thanks: 46 given, 27 received

Can't Compile!

I was trying to paste some new code into my strategy and now I can't get it to compile. I was hoping someone could take a look and see whats wrong.??? PLEASE!

Attached Files
Register to download File Type: cs TRYONEWUTHLIMITtwo.cs (3.1 KB, 8 views)
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
Santa Maria
 
Futures Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Broker/Data: Mirus/Zen-Fire
Favorite Futures: ES
 
Posts: 295 since May 2010
Thanks: 101 given, 320 received



sdt929 View Post
I was trying to paste some new code into my strategy and now I can't get it to compile. I was hoping someone could take a look and see whats wrong.??? PLEASE!

For starters you have two "protected override void OnBarUpdate()" code blocks. You'll have to consolidate them into one function.

Reply With Quote
 
  #4 (permalink)
Elite Member
Dallas, Texas
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: Amp/CQG
Favorite Futures: CL,ZB,TF
 
sdt929's Avatar
 
Posts: 17 since Sep 2009
Thanks: 46 given, 27 received

Well ???

Ok, not sure of what I am doing but one thing I am sure of....I don't know a thing about programming. lol I tried combining the 2 blocks and made things worse. Heres what I have done, if anyone wants to help! Thanks in advance for any help!

Attached Files
Register to download File Type: cs TRYONEWUTHLIMITtwo.cs (3.1 KB, 9 views)
Reply With Quote
 
  #5 (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, 176 received


sdt929 View Post
Ok, not sure of what I am doing but one thing I am sure of....I don't know a thing about programming. lol I tried combining the 2 blocks and made things worse. Heres what I have done, if anyone wants to help! Thanks in advance for any help!

Have you tried commenting out th lines that are throwing out errors in the compiler?

What errors are you getting?

TJ

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
 
  #6 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received


sdt929 View Post
Ok, not sure of what I am doing but one thing I am sure of....I don't know a thing about programming. lol I tried combining the 2 blocks and made things worse. Heres what I have done, if anyone wants to help! Thanks in advance for any help!

Cleaned up a bit, though I cannot really see, what you are trying to do with that strat......
 
Code
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    /// <summary>
    /// Enter the description of your strategy here
    /// </summary>
    [Description("Enter the description of your strategy here")]
    public class TRYONEWUTHLIMITtwo : Strategy
    {
        #region Variables
        // Wizard generated variables
        // User defined variables (add any user defined variables below)
        #endregion

        /// <summary>
        /// This method is used to configure the strategy and is called once before any strategy method is called.
        /// </summary>
        protected override void Initialize()
        {
            SetProfitTarget("", CalculationMode.Ticks, 10);
            SetStopLoss("", CalculationMode.Ticks, 10, false);

            CalculateOnBarClose = true;
        }

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {
            // Condition set 1
            if (Close[0] == High[0]
                && Close[1] == High[1])
            {
                EnterLong(DefaultQuantity, "1");
            }

            // Condition set 2
            if (Close[0] > High[1]
                && Close[1] > Close[1])
            {
                ExitLong("", "20");
            }
                        
            
            /// <summary>
            /// Called on each bar update event (incoming tick)
            /// </summary>
            
            
            
                // After our strategy has a PnL greater than $1000 or less that -$400 we will stop our strategy
                if (Performance.AllTrades.TradesPerformance.Currency.CumProfit > 1000
                    || Performance.AllTrades.TradesPerformance.Currency.CumProfit < -400)
                {
                    /* A custom method designed to close all open positions and cancel all working orders will be called.
                    This will ensure we do not have an unmanaged position left after we halt our strategy. */
                    StopStrategy();
                    
                    //Halt further processing of our strategy
                    return;
                
                }
                // Checks to see if the day of the week is Saturday or Sunday. Only allows trading if the day of the week is not Saturday or Sunday.
                if (Time[0].DayOfWeek != DayOfWeek.Saturday && Time[0].DayOfWeek != DayOfWeek.Sunday)
                 {
                    /* Checks to see if the time is during the following hours (format is HHMMSS or HMMSS). 
                   The timezone used here is (GMT-05:00) EST. */
                   if ((ToTime(Time[0]) >= 101500 && ToTime(Time[0]) <= 151500)) //|| (ToTime(Time[0]) >= 140000 && ToTime(Time[0]) < 154500))
                   {
                        if (Historical) return;}
                
                }
        }
            

        #region Properties
        #endregion
                }
            }
vvhg

Hic Rhodos, hic salta.
Reply With Quote
The following user says Thank You to vvhg for this post:

Reply



futures io > > > > > Can't Compile!

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple M.A. Summing Code - Won't compile in MC bobbakerr EasyLanguage Programming 12 July 22nd, 2011 09:57 AM
KST wont plot - no errors on compile Trader.Jon NinjaTrader Programming 2 April 6th, 2010 01:37 AM
@ADL.CS Compile Error Alan NinjaTrader Programming 5 February 17th, 2010 05:30 AM
Why do markers stop painting even tho no compile errors Saroj NinjaTrader Programming 4 August 14th, 2009 06:37 PM
Error on Compile Maletor NinjaTrader Programming 2 June 13th, 2009 04:30 PM


All times are GMT -4. The time now is 02: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-12-14 in 0.09 seconds with 20 queries on phoenix via your IP 54.221.76.68