executing strategy in backtesting - NinjaTrader Programming | futures io social day trading
futures io futures trading


executing strategy in backtesting
Updated: Views / Replies:2,262 / 11
Created: by cicondo 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
 2  
 
Thread Tools Search this Thread
 

executing strategy in backtesting

  #11 (permalink)
Elite Member
Milan (I)
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,217 given, 2,067 received


cicondo View Post
Hi Mike,

now I have a really simple projekt, but it shows the same problems. Please have a look at the attached both files.
Hope you can see the fault, otherwise it is a bug to report to NT.

Cheers
Markus

Hi Markus,

The indy is not plotting the EMA's and the crossabove/below are made with variables which are doing nothing and or I don't understand. I marked in yellow my version with print to debug (for the crossabove condition) to be used with the NT output window(your former print was of no help printing repeatedly the same message.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


 
Code
protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            Print("EMA"+period14+"="+EMA(Close, period14)[0]);
			Print("EMA"+period7+"="+EMA(Close, period7)[0]);
            if (CrossAbove(EMA(period7), EMA(period14), 1))

            {
                if (OnFireCrossUp != null)
                    OnFireCrossUp(this, Close[0]);
				
 


            }
            if (CrossBelow(EMA7, EMA14, 1))
            {
                if (OnFireCrossDown != null)
                    OnFireCrossDown(this, Close[0]);
            }
        }

Reply With Quote
 
  #12 (permalink)
Just starting out...
Munich
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: Forex, Oil, Futures
 
Posts: 6 since Apr 2011
Thanks: 1 given, 1 received


redratsal View Post
Hi Markus,

The indy is not plotting the EMA's and the crossabove/below are made with variables which are doing nothing and or I don't understand. I marked in yellow my version with print to debug (for the crossabove condition) to be used with the NT output window(your former print was of no help printing repeatedly the same message.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


 
Code
protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            Print("EMA"+period14+"="+EMA(Close, period14)[0]);
			Print("EMA"+period7+"="+EMA(Close, period7)[0]);
            if (CrossAbove(EMA(period7), EMA(period14), 1))

            {
                if (OnFireCrossUp != null)
                    OnFireCrossUp(this, Close[0]);
				
 


            }
            if (CrossBelow(EMA7, EMA14, 1))
            {
                if (OnFireCrossDown != null)
                    OnFireCrossDown(this, Close[0]);
            }
        }

Hi thx for your replay,

you're right the problem is, that the indicator OnBarUpdate() method will not be called. I usually dont use print statements because I debug the system with Visual Studio directly (keeps code clean).

I mention that the problem is using events with an indicator will not work properly. My question on that thread is for any help about that. Maybe there is one other NT developer who had the same problem.

Markus

Reply With Quote

Reply



futures io > > > > > executing strategy in backtesting

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit Strategy backtesting based on time of day blenderking NinjaTrader Programming 4 July 2nd, 2016 11:23 AM
VIDEO: MultiCharts vs. NinjaTrader strategy backtesting and optimization Big Mike MultiCharts 53 June 12th, 2016 02:34 PM
Backtesting identical strategy tradestation and multicharts different results crbucks MultiCharts 7 April 26th, 2012 08:30 AM
Prevent strategy from executing trade at the same price level within a session suprsnipes NinjaTrader Programming 1 February 28th, 2010 11:40 PM
What do you look at when backtesting a strategy ? soumi71 The Elite Circle 13 November 26th, 2009 09:39 AM


All times are GMT -4. The time now is 10:38 PM.

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-10 in 0.07 seconds with 20 queries on phoenix via your IP 54.221.73.186