NexusFi: Find Your Edge


Home Menu

 





Strategy Builder for Non-Programmers NO CODE


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one jmont1 with 47 posts (85 thanks)
    2. looks_two romus with 29 posts (20 thanks)
    3. looks_3 Fugitive69 with 16 posts (30 thanks)
    4. looks_4 userque with 15 posts (11 thanks)
      Best Posters
    1. looks_one Fugitive69 with 1.9 thanks per post
    2. looks_two jmont1 with 1.8 thanks per post
    3. looks_3 romus with 0.7 thanks per post
    4. looks_4 userque with 0.7 thanks per post
    1. trending_up 48,602 views
    2. thumb_up 158 thanks given
    3. group 44 followers
    1. forum 132 posts
    2. attach_file 66 attachments




 
Search this Thread

Strategy Builder for Non-Programmers NO CODE

  #1 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019

Strategy or automation of the decision process has become the focus of many traders. The markets seem to have proven to be too complex for the standard human to “outsmart.” Emotions or psychology seem to prove to be the undoing of many.

So looking for at least a good entry point void of emotion is now the holy grail of trading, especially for scalpers.

Programming is not easily achieved by many whom wish to avail themselves of these tools but do not have the time, knowledge, or patience. NT Strategy Wizard seems like a wonderful tool to accomplish either sim trading that could be emulated or live trading with the strategy creating the entry and the trader planning the exit. Of course completely automated would be wonderful. But until you find that nirvana, the entry portion may be enough.

Attached is a basic wizard strategy that could be used as a good framework for starting with the wizard. It includes Market Analyzer elements that can be used and reused in the Strategy Analyzer. Please post new strategies.

Most strategies seem to have at least some MA, and trailing stops. These elements are there for optimization. There are also two “reusable parameters’ that would be set for each area of planning or optimizing the strategy. Then those elements would be set in the area of testing and they are available to be reused in another optimization.

I am sincerely hoping that this forum will allow for novices to begin creating strategies that could be shared across the non-programming traders.

To get started:

Place the attached file in \My Documents\NinjaTrader 7\bin\Custom\Strategy

Then use Tools, Edit Ninja Script, select the file. It should open in the Strategy Edit Wizard. Once the file is opened you will need to compile it. Then you can run it on your system as is and use the Strategy Analyzer to see its back test and/ optimization.

Strategy Wizard allows you to add indicators and parameters without being a programmer.

Before you start modifying it, you probably want to rename it into your personally named file - this can simply be done by renaming it in the first section.

FYI, if you do something that comes back stating your strategy cannot compile. Push that view code, compile and it will show you the errors.

Once you have the strategy “perfected” post it here for others to provide recommendations. Additionally, enter it in the


Good trading to all!

EDIT: FYI, Strategy Wizard is going to use the default settings of the indicators to plot on the screen. There are two ways to modify this.

1st. Of course you just rename the locked indicator by right clicking in the indicator edit and "Save As" another name. Now use that name for your strategy.

2nd. Locked indicators cannot be saved under their locked name from NinjaTrader. BUT they can be opened in MS Word for editing. As long as you are keeping it simple, i.e... just changing the plot from line to triangleRight, etc... these indicators can be saved under their locked name. This allows for customization of the Strategy Wizard plots.

U P D A T E:

NT8 Strategy Builder expands on NT7 Strategy wizard to where the names should really be reversed because builder is the wizard!

Been trying for years to get a working profitable strategy. My history as a trader is disgustingly poor (as in I've lost a fortune.) So much money in loss carry over that I cannot get myself to leave that tax benefit behind.

Automate or fail is my new mantra. But “If you automate a process that has errors, all you’ve done is automate the generation of those errors.” Makes sense but I kept trying to automate my unsuccessful manual trading – primarily because my biggest problems are widening stops and not taking small wins.

Since this is not a a blog I will get back to focus on this strategy. Figuring correlated markets which would be beyond my ken to track on my own might take me to a different level of ‘scalping.” So I threw instruments into Strategy Builder expecting that if all the currency “6’s” were trending and $US (DX) was trending opposite there should be a good advantage on the trade. I even added GC and ZB for good measure. But it was still not working.

To save some reading for many – currently this strategy is looking for ICE’s DX instrument. If you do not subscribe you could still do back testing by loading historic files but not likely to work live. Tried to find an indicator to “Rube Goldberg” a facsimile of DX but gave up.

So this possibly good strategy is an odd mix currently using 6E (euro,) DX ($US) and ES (S&P.) They are all using 30 second bars for traditional three (3) soldier / crow signals against a 150s primary instrument bar for ES. Originally felt DX would be the driving force of the strategy but it turns it is pretty shallow volume and 6E is much stronger.

If your strategy attempts an entry and that bar closes – the order is canceled so the longer 150s TF of prime trade bar helps avoid that.

Then I felt that I do not want to take trends at the edges, I.E… offset high of the day so that I am not trying to go long 3 ticks below the high of day, etc… OHLLong, PSARLong are offset ticks

So currently all of the instruments need three 30s bars (90s) trending at the same time. Then an entry enters on the primary 150s instrument. Performing all that cross instrument calculation means back testing takes a while till the data is loaded and run through. I also check the tick replay box which extends the back test time substantially EVEN THOUGH NT support says that it is not there to improve backtest entry results.

Beware Coders - you will think the logic is in a strange order but that is partially because strategy builder starts you in the last highest number tab rather than # 1. So junk or exit parameters are earlier than logical to make it esier to jump in and out of the builder's primary entry tabs.

Then you will notice that there are essentially two tabs with the exact same logic. That is so the first trade of the strategy is not added to in the same bar. So the second tab only enters after a previous trade exits.

You will also see at least one tab with an illogical statement that close[0] != close[0] which holds things I want to be on the chart but do not need to have trade logic. It is also there if I decided to eliminate a section while testing, I.e.. no longs so those entry pages are as close not equal close.

Strategy analyzer takes quite a while to finish on this file so I have only been doing about a month back at a time. But the results using tick replay show a good return.

If someone has a stronger machine and does better testing it would be appreciated if you would warn me if this is just a waste of time. Then I will move on from the ES as primary instrument and again try to make it work with the 6’s.

To recap, this scalp is used with ICE’s DX and then it uses 6E and ES on a 150 second (2 ½ minute) ES chart.

Chart instrument: ES (others like 6E and DX will load from the strategy)

Timeframe: 150 seconds (2 1/2 minutes)

Tick Replay Checked - at least for strategy analyzer

Backtests about 60% profitable but with the trailing stop it gives pretty good scalps on ES.
Hope it works for us all!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NT8 uses Strategy Builder and so any old strategies would need to be converted.
I built this very basic core strategy framework to be able to test whether NT8 could use an indictor as is or if additional changes need to be made in the base strategy. For instance NT8 still cannot see "Double" elements even if exposed so the plots need to be "INT'."
Some strategies have bools or +1 / -1 elements to signal longs or shorts. Using this testing strategy you can see if the information is exposed for NT8 Strategy Builder. Good Trading All !!!

Well unfortunately Futures.IO is restricting posting of the strategy so I will place "IndiTestIt" in the thread - look for it.

Attached Files
Elite Membership required to download: AbaseWizard.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Spoo-nalysis ES e-mini futures S&P 500
24 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 787 since Dec 2010
Thanks Given: 2,012
Thanks Received: 3,168


jmont1 View Post
Strategy or automation of the decision process has become the focus of many traders. The markets seem to have proven to be too complex for the standard human to “outsmart.” Emotions or psychology seem to prove to be the undoing of many.

So looking for at least a good entry point void of emotion is now the holy grail of trading, especially for scalpers.

Programming is not easily achieved by many whom wish to avail themselves of these tools but do not have the time, knowledge, or patience. NT Strategy Wizard seems like a wonderful tool to accomplish either sim trading that could be emulated or live trading with the strategy creating the entry and the trader planning the exit. Of course completely automated would be wonderful. But until you find that nirvana, the entry portion may be enough.

Attached is a basic wizard strategy that could be used as a good framework for starting with the wizard. It includes Market Analyzer elements that can be used and reused in the Strategy Analyzer. Please post new strategies.

Most strategies seem to have at least some MA, and trailing stops. These elements are there for optimization. There are also two “reusable parameters’ that would be set for each area of planning or optimizing the strategy. Then those elements would be set in the area of testing and they are available to be reused in another optimization.

I am sincerely hoping that this forum will allow for novices to begin creating strategies that could be shared across the non-programming traders.

To get started:

Place the attached file in \My Documents\NinjaTrader 7\bin\Custom\Strategy

Then use Tools, Edit Ninja Script, select the file. It should open in the Strategy Edit Wizard. Once the file is opened you will need to compile it. Then you can run it on your system as is and use the Strategy Analyzer to see its back test and/ optimization.

Strategy Wizard allows you to add indicators and parameters without being a programmer.

Before you start modifying it, you probably want to rename it into your personally named file:

Using Windows Explorer (search) to rename the file will not work since the file name and the internal text strategy name must match.

Strategy or automation of the decision process has become the focus of many traders. The markets seem to have proven to be too complex for the standard human to “outsmart.” Emotions or psychology seem to prove to be the undoing of many.


Good trading to all!

Great idea jmont1, but why have I found it just now?!
Especially useful is the time example and multiple exits.

Many thanks!

When nothing goes right... go left
Reply With Quote
Thanked by:
  #3 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019


Used the base wizard that started this thread to make a strategy for a member.

Request:

When new high is hit - go long with small target and vice versa for new low

The idea should hit target fairly quickly so it has a maximum number of bars and max loss from that max bars.

Did not return a good ROI but it is a usable example of strategy without coding.

Attached Files
Elite Membership required to download: HiLowHit02.cs
Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019

NT8 is now using Strategy Builder that has many more capabilities than NT 7's Strategy Wizard. One major item is you can add a secondary instrument and timeframe to the original chart set up.

Just to assist in getting novices started faster I have created a base strategy with multiple likely variables. It is not a real strategy since it only has two (2) condition entries on tab 1 for a long and tab six for a short. Tab 10 has an interesting item that allows for closing a position based on number of bars and minimum profit. This is to get out of positions that have languished beyond a reasonable point.

ALL of the variables are set quite high so adjust them to more reasonable levels.

Additional tabs may look like there is a condition but it is basically Close(0) != Close(0) -- essentially saying price does not equal price. This is there so those pages are defunct until that condition is removed and replaced with actual conditions.

The second strategy is an attempt to build an entry based on three consecutive bars in the same trend - essentially 3 White Soldiers or 3 black crows. It did not turn out with a successful profit but it may help with ideas.

Hope this helps.

FYI, to change the name of the aBase1 strategy for your own edits, select it from the drop down and hit "Next" at bottom of page. Then hit "Back" and the name field will be editable.

AND if you do get a reasonable strategy, PLEASE share it here. Collaboration may make it even better.

Attached Files
Elite Membership required to download: aBase1.cs
Elite Membership required to download: aaBase1Triple.cs
Started this thread Reply With Quote
  #5 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 787 since Dec 2010
Thanks Given: 2,012
Thanks Received: 3,168

@jmont1,

I have downloaded the file aBase1.cs and did not compile properly - called for TSSuperTrendStrat.cs - so I have downloaded this one as well. Now NT editor calls for SMMA (The name SMMA does not exist in the current context) and I could not find NT8 version.
Is NT7 version of SMMA suitable?

I am finding awkward to navigate in NT8 but would like to try its' multi instrument multi-timeframe Wizard capabilities - just have 'teething problems'.

Cheers,
romus

When nothing goes right... go left
Reply With Quote
Thanked by:
  #6 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019


romus View Post
@jmont1,

I have downloaded the file aBase1.cs and did not compile properly - called for TSSuperTrendStrat.cs - so I have downloaded this one as well. Now NT editor calls for SMMA (The name SMMA does not exist in the current context) and I could not find NT8 version.
Is NT7 version of SMMA suitable?

I am finding awkward to navigate in NT8 but would like to try its' multi instrument multi-timeframe Wizard capabilities - just have 'teething problems'.

Cheers,
romus

@romus, Guess I should get used to exporting the files into zip instead of providing cs files. Here is my first attempt at it. I expect you should be able to import all of the files.

I have not done much with the additional Data but it is on the third page - add Data. Then when you select an indicator change the Input Series through the drop down. Hope it works for you.

Attached Files
Elite Membership required to download: aBase1.zip
Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 787 since Dec 2010
Thanks Given: 2,012
Thanks Received: 3,168

@jmont1,

You are faster than a speeding ticket.
This has worked!
Now I have to go out of my comfort zone and find my way to use wizard in NT8.

Many thanks,
romus.

When nothing goes right... go left
Reply With Quote
Thanked by:
  #8 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 787 since Dec 2010
Thanks Given: 2,012
Thanks Received: 3,168

@jmont1,

I am back to comfort zone (NT7) - NT8 seems a bit harder to navigate at the moment.

Your sample strategy Wizard allowed me to make another step in creating simple strategies.
I wanted to build a strategy in NT7 for breakout e.g. of Opening Range where trade is taken any time after provided that Range in specified time is broken.
Then - Exit should be easier - On Close, Target, Next Open...

Could you give me an angle on this?

Many thanks in advance.

Best regards,
romus.

When nothing goes right... go left
Reply With Quote
Thanked by:
  #9 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 787 since Dec 2010
Thanks Given: 2,012
Thanks Received: 3,168

@jmont1,

Please disregard my request in previous post.
Going back I have found in Post #3 HiLowHit02 strategy which I am now trying to adjust for my needs.

Thanks again for your idea and input.

Bets regards,
romus.

When nothing goes right... go left
Reply With Quote
Thanked by:
  #10 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019


2018 == NT8 Strategy Builder bases


Will make a better edit later for now adding a couple of bases for Strategy builder. The first is for a single chart based indicator and timeframe.


Second is a multi-instrument and multi-timeframe currently set for ES and NQ.

UPDATE:

These samples primarily show that a lot of options can be thrown at Strategy builder without any coding.

First, using the primary instruments 20 second timeframe allows the range indicator to create a minimum and maximum range to trade in based on time even if used with non-timed charts like range, tick, volume or even delta charts. Notice on the RangeOfPEriodS (ROPE) indicator that instead of default for Data Series Input Series the “Default” was changed to the Default instrument but the 30 second timeframe and then the periods is a variable available for change from the current twenty (20 periods x 30 second TF = (10) ten minutes) to whatever is applicable.

Then various standard indicators can be applied either using the chart’s default instrument and chart type or other added multi’s can be allocated.

The times variables are set for the entire day but can be limited to specific times to perhaps avoid news periods like 10:30 EST Wednesday to avoid the volatility of the WTI Crdue (CL) report.

Right click on the bottom of the tab and another copy of the same elements could then be added for a second time setting to again trade at say 10:45 EST after the report has been assimilated.

The entries Long1 or Short1 are primed to be the first trade of the strategy based on no other trades changing the system performance realized profit from $0. The other tabs for L1 / S1 are there to ensure only one entry per bar by using the since exit parameter. Otherwise you could have a single bar have many many entries, i.e. criteria met so first trade goes to profit or stop loss, but criteria for bar still met so another entry on same bar could iterate til the bar closes causing lots of good and bad trades. If you are trying to scalp the NQ on a 5 or ten minute bar that might be a plan but if not it could really wipe out an account.

These examples were kept simple with the profit target being the same for all trades so realize you could have different profits for long vs short trades.

Unfortunately Strategy Builder does not have a capability for attaching an ATM so a basic trailing method is used.

A variation on a standard “market” long could be implemented with a median limit order that could also have an offset for higher by x ticks for longs and offset lower for shorts. Median entry prices will shift if the median of the bar moves. The standard for these strategies is if the entry does not occur on the current bar it is canceled on the start of the new bar.

Hope these comments provide some context and assit you in your strategy. As you would expect, any samples you may come up with would be appreciated as we all look for at least a break even strategy to collaborate.

Good trading all.

Attached Files
Elite Membership required to download: aBase1.cs
Elite Membership required to download: aBase1MultiTFesNQ.cs
Started this thread Reply With Quote
Thanked by:




Last Updated on November 16, 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