NexusFi: Find Your Edge


Home Menu

 





Learning By Example [Request]


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ReximusMaximus with 4 posts (3 thanks)
    2. looks_two userque with 2 posts (2 thanks)
    3. looks_3 brach with 2 posts (1 thanks)
    4. looks_4 bobwest with 1 posts (0 thanks)
    1. trending_up 1,639 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Learning By Example [Request]

  #1 (permalink)
 ReximusMaximus 
SAINT LOUIS
 
Experience: Advanced
Posts: 40 since Aug 2019
Thanks Given: 7
Thanks Received: 23

I'm looking to learn ninjascript to write some basic strategies. I'm a discretionary trader but prefer to automate my entries.

I've been using MQL4 and EasyLanguage for years for this, and now would like to tackle NinjaScript.

What is the best way to get ahold of some sample code for a strategy I'm going to begin testing? Is there a place where people will do this in the elite section (I rarely visit this site so am totally ignorant), or is it preferred that I post a job description somewhere?

It's remarkably simple as my exits (my edge) are discretionary.

Entry would be a break (I use pending stop market orders) X ticks across the extreme of the "swing" indicator.

Three filters:
1. Long above/short below - current session open price.
2. Long above/short below - current VWAP.
3. Long above zero/short below zero - cumulative volume delta (bid/ask).

I would enter with multiple contracts (let's say three for this example) with one stop, and exit with three targets.

Is this something I should go somewhere else and post a job for coders to bid on? I would really prefer to have the code rather than just the compiled program, so that I can learn and build upon the code as a learning exercise. I've found quite a few coders who do not like to share their code, so I'm not sure if this request will wrong people the wrong way.

Thanks for taking the time to read this, and please point me in the right direction if you're able.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Discipline isnt about fortitude. Its about conviction!
Psychology and Money Management
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
65 thanks
Self sabotage reframed
15 thanks
GFIs1 1 DAX trade per day journal
15 thanks
Trading with Intuition
14 thanks
Just another trading journal: PA, Wyckoff & Trends
11 thanks
  #2 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


ReximusMaximus View Post
I'm looking to learn ninjascript to write some basic strategies. I'm a discretionary trader but prefer to automate my entries.

I've been using MQL4 and EasyLanguage for years for this, and now would like to tackle NinjaScript.

What is the best way to get ahold of some sample code for a strategy I'm going to begin testing? Is there a place where people will do this in the elite section (I rarely visit this site so am totally ignorant), or is it preferred that I post a job description somewhere?

It's remarkably simple as my exits (my edge) are discretionary.

Entry would be a break (I use pending stop market orders) X ticks across the extreme of the "swing" indicator.

Three filters:
1. Long above/short below - current session open price.
2. Long above/short below - current VWAP.
3. Long above zero/short below zero - cumulative volume delta (bid/ask).

I would enter with multiple contracts (let's say three for this example) with one stop, and exit with three targets.

Is this something I should go somewhere else and post a job for coders to bid on? I would really prefer to have the code rather than just the compiled program, so that I can learn and build upon the code as a learning exercise. I've found quite a few coders who do not like to share their code, so I'm not sure if this request will wrong people the wrong way.

Thanks for taking the time to read this, and please point me in the right direction if you're able.

Your strategy would be easy to 'code' in NT; even with the strategy builder, it seems.

You could, first, try to code it using NT's strategy builder. SB uses English, not code.

You can then 'look' at the code NT generated from your 'English.' This becomes the 'sample code' you asked about.

Also, sample code is on the internet. There are statements/keywords that are found in nearly all Ninjascripts (NS), and nearly no where else. After looking at a few scripts, you'll see what I mean. You can google these statements/keywords/phrases to find additional scripts.

Sample Code:

https://forum.ninjatrader.com/forum/ninjascript-educational-resources/reference-samples

You can find lots of information in NT forums.

Reply With Quote
Thanked by:
  #3 (permalink)
 
brach's Avatar
 brach 
Austin, TX
 
Experience: Intermediate
Platform: NT, SC, MT
Trading: NQ, ES, Micros
Posts: 89 since May 2018
Thanks Given: 187
Thanks Received: 269


When I started this video by Big Mike helped me. With that, plus some googling and finding examples in the NT forums, I was able to create my first live trading algo. This is based on NT7... I haven't made the move to NT8 yet.

Link:

Reply With Quote
Thanked by:
  #4 (permalink)
 ReximusMaximus 
SAINT LOUIS
 
Experience: Advanced
Posts: 40 since Aug 2019
Thanks Given: 7
Thanks Received: 23


userque View Post
Your strategy would be easy to 'code' in NT; even with the strategy builder, it seems.

You could, first, try to code it using NT's strategy builder. SB uses English, not code.

You can then 'look' at the code NT generated from your 'English.' This becomes the 'sample code' you asked about.

Also, sample code is on the internet. There are statements/keywords that are found in nearly all Ninjascripts (NS), and nearly no where else. After looking at a few scripts, you'll see what I mean. You can google these statements/keywords/phrases to find additional scripts.

Sample Code:

https://forum.ninjatrader.com/forum/ninjascript-educational-resources/reference-samples

You can find lots of information in NT forums.

Thanks for taking the time to reply.

My first inclination was to use the strategy builder to generate the sample code to learn from, however they removed VWAP and CVD due to some sort of technical issues according to their support team, this is what prompted me to come here.

And yes, I am very aware I can just google it. The purpose of this post was to save time, I am open to posting a job description in order to save that time but as you said I can just google it myself and spend that time.

Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 ReximusMaximus 
SAINT LOUIS
 
Experience: Advanced
Posts: 40 since Aug 2019
Thanks Given: 7
Thanks Received: 23


brach View Post
When I started this video by Big Mike helped me. With that, plus some googling and finding examples in the NT forums, I was able to create my first live trading algo. This is based on NT7... I haven't made the move to NT8 yet.

Link:

Thanks, I'm on NT8, how much of this content is relevant between versions?

Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


ReximusMaximus View Post
Thanks, I'm on NT8, how much of this content is relevant between versions?

I think you would confuse yourself trying to learn NT8, by learning NT7 first.

Also, I wasn't just telling you to "google it." You can google ninjascript and not find much sample code.

I told you to google the unique statements/keywords etc. that are in each ninjascript, to help you find sample scripts.

There is a big difference in the two search approaches; and doing the one I recommended is not intuitive for beginners, imo.

I'm sure we can help with such a simple strategy. As you proceed, if you choose to try to code it yourself, post whatever code you've written between CODE tags here ... and we'll see how it goes.

Reply With Quote
Thanked by:
  #7 (permalink)
 
brach's Avatar
 brach 
Austin, TX
 
Experience: Intermediate
Platform: NT, SC, MT
Trading: NQ, ES, Micros
Posts: 89 since May 2018
Thanks Given: 187
Thanks Received: 269


ReximusMaximus View Post
Thanks, I'm on NT8, how much of this content is relevant between versions?

I haven't created anything substantial with Ninjascript 8 yet. If you search for ninjascript on the futures.io youtube channel you can probably find a couple of videos that cover v8.

Reply With Quote
  #8 (permalink)
 ReximusMaximus 
SAINT LOUIS
 
Experience: Advanced
Posts: 40 since Aug 2019
Thanks Given: 7
Thanks Received: 23


userque View Post
I think you would confuse yourself trying to learn NT8, by learning NT7 first.

Also, I wasn't just telling you to "google it." You can google ninjascript and not find much sample code.

I told you to google the unique statements/keywords etc. that are in each ninjascript, to help you find sample scripts.

There is a big difference in the two search approaches; and doing the one I recommended is not intuitive for beginners, imo.

I'm sure we can help with such a simple strategy. As you proceed, if you choose to try to code it yourself, post whatever code you've written between CODE tags here ... and we'll see how it goes.

Gotcha, thanks

Started this thread Reply With Quote
  #9 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,173 since Jan 2013
Thanks Given: 57,550
Thanks Received: 26,300


ReximusMaximus View Post
I'm looking to learn ninjascript to write some basic strategies. I'm a discretionary trader but prefer to automate my entries.

I've been using MQL4 and EasyLanguage for years for this, and now would like to tackle NinjaScript.

What is the best way to get ahold of some sample code for a strategy I'm going to begin testing? Is there a place where people will do this in the elite section (I rarely visit this site so am totally ignorant), or is it preferred that I post a job description somewhere?

It's remarkably simple as my exits (my edge) are discretionary.

Entry would be a break (I use pending stop market orders) X ticks across the extreme of the "swing" indicator.

Three filters:
1. Long above/short below - current session open price.
2. Long above/short below - current VWAP.
3. Long above zero/short below zero - cumulative volume delta (bid/ask).

I would enter with multiple contracts (let's say three for this example) with one stop, and exit with three targets.

Is this something I should go somewhere else and post a job for coders to bid on? I would really prefer to have the code rather than just the compiled program, so that I can learn and build upon the code as a learning exercise. I've found quite a few coders who do not like to share their code, so I'm not sure if this request will wrong people the wrong way.

Thanks for taking the time to read this, and please point me in the right direction if you're able.

One idea is that you can post your request in the free NT strategy thread. If you specify clearly what you are looking for, it may attract some attention and someone may be willing to give it a shot.

Link is here:



You can also often get help in NinjaScript coding by posting in the free NT indicator thread. I know you are not looking for an indicator, but if you have some particular coding question, you may find help there as well:



Since participation is by volunteers, you can't be guaranteed that someone will pitch in, but they often do. See if these work out for you.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote




Last Updated on March 8, 2021


© 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