NexusFi: Find Your Edge


Home Menu

 





What should be the next step in my backtesting??


Discussion in Emini and Emicro Index

Updated
      Top Posters
    1. looks_one budfox with 40 posts (2 thanks)
    2. looks_two treydog999 with 21 posts (25 thanks)
    3. looks_3 tellytub with 6 posts (4 thanks)
    4. looks_4 Fat Tails with 2 posts (1 thanks)
      Best Posters
    1. looks_one Ming80 with 2.5 thanks per post
    2. looks_two treydog999 with 1.2 thanks per post
    3. looks_3 shodson with 1 thanks per post
    4. looks_4 tellytub with 0.7 thanks per post
    1. trending_up 16,301 views
    2. thumb_up 41 thanks given
    3. group 9 followers
    1. forum 76 posts
    2. attach_file 4 attachments




 
Search this Thread

What should be the next step in my backtesting??

  #51 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013


tellytub View Post
IN the second block of code where they have " static int formula(int theVal)
{
return (theVal * 2) / 3 + 15;
}"

1. What is "theVal" what does that mean?
2. What does the "{0}" mean?
3. How does the program know that 'theVal' equals "25" (or arg 1)


1. theVal is a parameter, so

result1 = formula(arg1);

means run the function or method called formula and pass the value arg1 (in this case is 25), you can call the parameter anything you want, just as long as its the same name i.e. return (theVal * 2) / 3 + 15;

3. Because in the start of the program you've declared it as 25 i.e

static void Main(string[] args)
{ int result1;
int arg1 = 25;


static void Main(string[] args)
{ int result1;
int arg1 = 25;



but didn't I also declare int as 'result1' too?

so how will it know whether to use arg1 or result1?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #52 (permalink)
 
tellytub's Avatar
 tellytub 
london uk
 
Experience: Beginner
Platform: NinjaTrader
Broker: Zen-Fire
Trading: Stocks
Posts: 410 since Jun 2009
Thanks Given: 333
Thanks Received: 121

 
Code
namespace Functions_and_Methods
{
    class Program
    {
        static void Main(string[] args)
        {  int result1;
        int arg1 = 25;

        result1 = formula(arg1);
            Console.WriteLine("The result is: {0}", result1);
            Console.ReadLine();
        }

        static int formula(int theVal)
        {
            return (theVal * 2) / 3 + 15;
                    }

        
        }
    }

Quoting 
static void Main(string[] args)
{ int result1;
int arg1 = 25;


but didn't I also declare int as 'result1' too?

so how will it know whether to use arg1 or result1?

because YOU passed the value 25 to the method i.e. arg1, and the return value from the method will be assigned to result1.

result1 = formula(arg1);

the line above is the same as:

31.66 = formula(25);


For you to understand the code, I think its best to step into the code, thats if you have visual studio

Reply With Quote
Thanked by:
  #53 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013



tellytub View Post
 
Code
namespace Functions_and_Methods
{
    class Program
    {
        static void Main(string[] args)
        {  int result1;
        int arg1 = 25;

        result1 = formula(arg1);
            Console.WriteLine("The result is: {0}", result1);
            Console.ReadLine();
        }

        static int formula(int theVal)
        {
            return (theVal * 2) / 3 + 15;
                    }

        
        }
    }


because YOU passed the value 25 to the method i.e. arg1, and the return value from the method will be assigned to result1.

result1 = formula(arg1);

the line above is the same as:

31.66 = formula(25);


For you to understand the code, I think its best to step into the code, thats if you have visual studio


Yeah I have visual studio and I run script in it console apps , I'm not just reading code lol

Started this thread Reply With Quote
  #54 (permalink)
 
tellytub's Avatar
 tellytub 
london uk
 
Experience: Beginner
Platform: NinjaTrader
Broker: Zen-Fire
Trading: Stocks
Posts: 410 since Jun 2009
Thanks Given: 333
Thanks Received: 121


budfox View Post
Yeah I have visual studio and I run script in it console apps , I'm not just reading code lol

Press Control+F5 for console apps, that way you can step into your code.

Reply With Quote
  #55 (permalink)
 Farmer George 
Krakow Poland
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Stocks
Posts: 19 since Oct 2014
Thanks Given: 11
Thanks Received: 1


treydog999 View Post
easylanguage is the "easiest" although very specific to the tradestation or multicharts platform. Learning a more "legitimate" programming language Java, Python, R, or anything in the C family will give you more power and not be bound by a specific platform. It depends on your goals, how much you are willing to put in to study and learn a specific one. I would say that easylanguage is the best way to dip your toe in, and be able to test a very many different systems and get them to run and execute automatically. If I were to pick another language it would be from the C family, either C++ or C# this is because a lot of programs use it (including ninja trader).

R and Python I put into another category because they are very high level scripting languages. Powerful, useful and easy to develop for but are not very well integrated into other platforms.

Are you aware of any Matlab functionality in this regard? Thanks.

Reply With Quote
  #56 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013

Hi there,

So I am learning the basic course of C# at Lynda, I would like you guys to take a look at the course curriculum I have in blue below and tell me what are the main items I should know for NInjascript (of course you dont need to know everything!).

Just put a * to whatI need to know and a @ next to something that I dont really need to know for ninjascript

I plan on finishing this course and then tackling some simple scripts in ninja.

Thank You










3. Program Flow


Reading and writing from and to the Console

Writing conditional statements

Using the switch statement

Using operators and expressions

Using constants and enumerations

Using loops

Using functions and methods


4. Variables


Understanding data types

(Almost) everything is an object

Working with numbers

Working with characters and strings

Understanding variable scope

Understanding type conversion


5. Custom Classes and Objects



Object orientation refresher

Defining a class

Using access modifiers

Defining properties

Understanding value and reference types



6. Collections



Working with arrays

Using array lists

Working with stacks

Working with queues

Using dictionaries


7. More Complex Classes



Overloading methods

Overriding methods

Creating abstract classes and methods

Using sealed classes

Defining structs

Using interfaces



8. Exceptions

Understanding exceptions

Introducing the Exception object

Creating your own exceptions

Re-throwing exceptions


9. File Management



Introducing streams and files
5m 10s
Working with existing files
6m 49s
Working with directory and disk information
6m 15s
Using the Path class
6m 41s
Reading and writing files
9m 4s


10. Some Advanced C#

Using variable parameter lists

Using function parameter modifiers

Using optional and named function parameters

Using the C# preprocessor

Working with delegates

Handling events



11. Garbage Collection

How garbage collection works

The Garbage Collector object

12. Debugging

Common compilation issues

Setting breakpoints and examining code

Using the Debug class

@treydog999 @tellytub @shodson @Zondor @Zxeses @Fat Tails @NJAMC @ratfink @jmont1

Started this thread Reply With Quote
  #57 (permalink)
 
tellytub's Avatar
 tellytub 
london uk
 
Experience: Beginner
Platform: NinjaTrader
Broker: Zen-Fire
Trading: Stocks
Posts: 410 since Jun 2009
Thanks Given: 333
Thanks Received: 121

Hope this helps?


3. Program Flow


** Reading and writing from and to the Console -- does not matter if its a console or windows app

** Writing conditional statements

** Using the switch statement

** Using operators and expressions

** Using constants and enumerations

** Using loops

** Using functions and methods


4. Variables


** Understanding data types

(Almost) everything is an object

** Working with numbers

Working with characters and strings

** Understanding variable scope

** Understanding type conversion


5. Custom Classes and Objects



Object orientation refresher

** Defining a class

** Using access modifiers

** Defining properties

** Understanding value and reference types



6. Collections



** Working with arrays

Using array lists

Working with stacks

Working with queues

Using dictionaries


7. More Complex Classes



Overloading methods

Overriding methods

Creating abstract classes and methods

Using sealed classes

Defining structs

Using interfaces



8. Exceptions

** Understanding exceptions

Introducing the Exception object

Creating your own exceptions

Re-throwing exceptions


9. File Management



Introducing streams and files
5m 10s
Working with existing files
6m 49s
Working with directory and disk information
6m 15s
Using the Path class
6m 41s
Reading and writing files
9m 4s


10. Some Advanced C#

Using variable parameter lists

Using function parameter modifiers

Using optional and named function parameters

Using the C# preprocessor

Working with delegates

Handling events



11. Garbage Collection

How garbage collection works

The Garbage Collector object

12. Debugging

Common compilation issues

** Setting breakpoints and examining code

Using the Debug class

Reply With Quote
Thanked by:
  #58 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013


tellytub View Post
Hope this helps?


3. Program Flow


** Reading and writing from and to the Console -- does not matter if its a console or windows app

** Writing conditional statements

** Using the switch statement

** Using operators and expressions

** Using constants and enumerations

** Using loops

** Using functions and methods


4. Variables


** Understanding data types

(Almost) everything is an object

** Working with numbers

Working with characters and strings

** Understanding variable scope

** Understanding type conversion


5. Custom Classes and Objects



Object orientation refresher

** Defining a class

** Using access modifiers

** Defining properties

** Understanding value and reference types



6. Collections



** Working with arrays

Using array lists

Working with stacks

Working with queues

Using dictionaries


7. More Complex Classes



Overloading methods

Overriding methods

Creating abstract classes and methods

Using sealed classes

Defining structs

Using interfaces



8. Exceptions

** Understanding exceptions

Introducing the Exception object

Creating your own exceptions

Re-throwing exceptions


9. File Management



Introducing streams and files
5m 10s
Working with existing files
6m 49s
Working with directory and disk information
6m 15s
Using the Path class
6m 41s
Reading and writing files
9m 4s


10. Some Advanced C#

Using variable parameter lists

Using function parameter modifiers

Using optional and named function parameters

Using the C# preprocessor

Working with delegates

Handling events



11. Garbage Collection

How garbage collection works

The Garbage Collector object

12. Debugging

Common compilation issues

** Setting breakpoints and examining code

Using the Debug class

Great! Thanks a lot TellyTubby ! After getting through the Lynda material, I will start playing with some basic exercises in C# and then maybe start tackling some small scripts in ninja.

Started this thread Reply With Quote
  #59 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013

Ok so now I completed manually backtesting another 50 trades on my third model, lets call it Model D.

Here are the stats:

  1. Win ratio = 40%
  2. Max DD = 56%
  3. Ave Win = 0.0013
  4. Ave Loss = 0.0008

I really dont like the low win ratio but what really leads me to decide to backtest another 50 trades from 1 Aug - Now 2014 is the other stats.

The first 50 trade sample is from 8 Jan - Apr 23 . Instrument is EURUSD. trades are executed off the 5min.

Looks good on paper, but I can already tell it will be hard to manualy trade.

Thanks.














@Hulk @kevinkdog @tellytub @Ming80 @treydog999 @bobwest @sam028

Started this thread Reply With Quote
  #60 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039



Farmer George View Post
Are you aware of any Matlab functionality in this regard? Thanks.

Sorry I have never used matlab.

Reply With Quote




Last Updated on December 1, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts