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 47,821 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

  #11 (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

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

True BUT if you used the auto strategy to get into a position and wanted to use an ATM you can cancel the trailing stop. Then right click on the position in the position tab. It will allow you to attach a full ATM to the position. Just be careful that when you close the trade the strategy will likely still consider it open - so cancel that strategy and restart it.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Exit Strategy
NinjaTrader
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
53 thanks
Funded Trader platforms
44 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #12 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105

Here's a strategy and indicator optimized for the ES. It uses UniR T2R6 bars.

The overriding priority is to keep stop losses to a minimum while catching the occasional runner.

Entry Logic
Currently the logic is set to be quite restrictive. The strategy could easily be modified to catch many more trades. I wanted to keep things very simple in the beginning before adding other parameters designed to catch additional trades. Hopefully other members here will also help toward that end.

Exit Logic
Uses a trailing stop as well as a parameter to exit when the first bar goes against the trade. So far this is working well keeping most stops to 2 ticks but allowing profits to run a bit at the same time.

Bells And Whistles
@jmont1 has provided some great examples in his Wizard Starter that can be implemented. Some need to be added here but haven't done so yet. Other features that interest me include:
  • Allow 2 Contracts - a primary and secondary
  • Select days of week to trade - may want to untick Monday for example
  • PnL Management - set MAX loss per session that if exceeded stops trading

-----------

The indicator included in the zip file is called kKrunchV2. It essentially utilizes 2 different PSAR lines of different "speeds" and calculates the difference between them. I found it very illuminating and hope others do as well.

My thinking behind the design of the indicator had to do with thresholds. I wanted a simple indicator with clearly defined thresholds. After experimenting with a number of different approaches I settled on the 2 PSAR lines. I'm not much of a coder yet so I'm sure it can be improved upon over time.

The reason I added lines at +500 and -500 are to help identify chop areas. The strategy definitely needs some tweaking but does seem to avoid chop fairly well using the basic parameters I've created in the logic.

Attached Thumbnails
Click image for larger version

Name:	kKrunchExample.png
Views:	444
Size:	104.5 KB
ID:	259775   Click image for larger version

Name:	kKrunchSummary.png
Views:	399
Size:	44.0 KB
ID:	259776  
Attached Files
Elite Membership required to download: kKrunchStrat.zip
Reply With Quote
  #13 (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



Fugitive69 View Post
Here's a strategy and indicator optimized for the ES. It uses UniR T2R6 bars.

The overriding priority is to keep stop losses to a minimum while catching the occasional runner.

@Fugitive69, Took the liberty of doing mods without changing any of the logic to let me see info on the chart as the strategy progresses.

Added a variable for trail stop = 6 but now you can tweak it when running strategy analyzer.

Added Profit target = 111 - not likely that would be a limiting factor but now you could decide to change it to a lower amount in the trade. The only down side to such a high profit target is it can skew the visual on the chart when it sows the target and the stop on the chart. So perhaps you want that set lower but high enough so it does not cut off your runner.

Put a day of the week not to trade = Sunday. You can change that but it needs to be changed in the actual trade entry tab since I am not sure how to make that a variable for the strategy analyzer and do not want to risk it is an issue. Your trades should be exactly the same less Sunday. Kill that statement if you do not want it. IT DID LOSE YOU FIVE (5) TRADES in the analyis.

Time of day is added which currently trades every minute except 11:59 -12:00. So now you could decide to just trade during RTH or just during the overnight session. You might want to do tab copies and use that to eliminate trades during news reports for instance, say 8:15 to 8:45.

BUT the biggest question I have in your set up is that it is using on bar close rather than on every tick. I think that should be changed but it drastically changed your trades. Unfortunately when I tried it real time SIM – the exit of long’s being <high happens many times on the entry bar so it is not viable to do every tick unless that exit is modified.

Cosmetic – made changes so this can be put on a blank chart without needing to add the indicators before launcing the strategy:

Set Kkrunch to show on the chart when strategy begins.

Added PSAR on chart – looks like you add that to the chart aside from the strategy and it is a line. But I juast left it as dots since I did not want to edit @PSAR although we probably could. If you want to edit an “ @ “ indicator you usually can do it by renaming it without the @ - make the mod and then rename adding back the @ using File Explorer for the renaming.

Added a range count based on thirty second bars. This required me to add a 30 second bar type which is not shown on the chart. You can kill this indicator if you do not like it.

Added a name to your exits which means instead of it saying buy to cover it says >Low. This way if you add more reasons to exit a trade by covering you can differentiate them. For instance I favor a maximum bar with minimum profit which would also be buy to cover. So if they are not named then you could not tell which it is.


Let me know if you approve any or all of the changes which may be incorporated into your next version. Then I will also try to figure some logic that may assist.


UPDATE: Im not too familiar with Unirenko but I tried keeping your system intact but changed from Uni 2, 2, 6 to a five (5) which I guess provides faster bars and it seemed to do better in strategy analyzer. Just a thought.

Also thought it might be worthwhile to put a minimum level for each since you are sort of trading into a slow down of momentum when the > 500 goes to < 250 - - should be also be a > than190 or 100 on the second bar. I see that with OnBarClose the entry is essentially on the third bar so that seems a bit long.

Like the very tight stops at entry - especially the long close < high but it may be too tight. So I have added an offset - both set to zero now -- but you could add a few more ticks if you thought it worthwhile -- of course since U R only calculating on bar close - do not make it too wide.

There are a good number of knobs for you to twist here. Hope you post your next version soon.


WHEN importing this, do not accept the indicators - for instance I changed your KKRunch lines from snow to yellow so I can see them on a white smoke background.

Attached Files
Elite Membership required to download: KKrunchJMont2.zip
Started this thread Reply With Quote
  #14 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105

@jmont1: Wow, you're faster than a speeding bullet.


jmont1 View Post
Took the liberty of doing mods without changing any of the logic to let me see info on the chart as the strategy progresses.

Feel free to change anything you think may help the cause. Just go ahead and change away - I'll try to keep up.
------------------

Just A General Note: This is all new to me and I don't know what I'm doing yet. Therefore, I tend to move at a snail's pace. As I experiment with each new tip and trick you show me I'm sure I'll get more comfortable with the process and pick up the pace a bit. Any suggestions you make are more than welcome.


Quoting 
BUT the biggest question I have in your set up is that it is using on bar close rather than on every tick. I think that should be changed but it drastically changed your trades. Unfortunately when I tried it real time SIM – the exit of long’s being <high happens many times on the entry bar so it is not viable to do every tick unless that exit is modified.

I was using using on bar close for only one reason - it seemed to keep things simple. By doing so I could go back and more easily examine each and every trade in the Strategy Analyzer chart view. Figured I could experiment with OnEachTick or OnPriceChange later on down the road when things were more completely dialed in.


Quoting 
Cosmetic – made changes so this can be put on a blank chart without needing to add the indicators before launcing the strategy:

Set Kkrunch to show on the chart when strategy begins.

Added PSAR on chart – looks like you add that to the chart aside from the strategy and it is a line. But I juast left it as dots since I did not want to edit @PSAR although we probably could. If you want to edit an “ @ “ indicator you usually can do it by renaming it without the @ - make the mod and then rename adding back the @ using File Explorer for the renaming.

Added a range count based on thirty second bars. This required me to add a 30 second bar type which is not shown on the chart. You can kill this indicator if you do not like it.

Excellent. I probably should have also exported my normal chart template. Doing so would have saved you some time getting to the same starting point. I'll remember to do that next time.



Quoting 
Added a name to your exits which means instead of it saying buy to cover it says >Low. This way if you add more reasons to exit a trade by covering you can differentiate them. For instance I favor a maximum bar with minimum profit which would also be buy to cover. So if they are not named then you could not tell which it is.

Thank you. I was wondering how this might all work. If I have multiple methods of entry and multiple methods of exit one really needs to know exactly which one was used when. Otherwise all trade "types" are lumped together and it would be very difficult to differentiate one from the other. It's the main reason I didn't use more than one entry method in the beginning. My hunch is I'll end up with several tabs using various trade entry methods - possibly exits too.



Quoting 
Let me know if you approve any or all of the changes which may be incorporated into your next version. Then I will also try to figure some logic that may assist.

UPDATE: Im not too familiar with Unirenko but I tried keeping your system intact but changed from Uni 2, 2, 6 to a five (5) which I guess provides faster bars and it seemed to do better in strategy analyzer. Just a thought.

Also thought it might be worthwhile to put a minimum level for each since you are sort of trading into a slow down of momentum when the > 500 goes to < 250 - - should be also be a > than zero or 100 on the second bar. I see that with OnBarClose the entry is essentially on the third bar so that seems a bit long.

Go man go! I'll take any and all help I can get.

Reply With Quote
Thanked by:
  #15 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105


jmont1 View Post
Added PSAR on chart – looks like you add that to the chart aside from the strategy and it is a line. But I juast left it as dots since I did not want to edit @PSAR although we probably could. If you want to edit an “ @ “ indicator you usually can do it by renaming it without the @ - make the mod and then rename adding back the @ using File Explorer for the renaming.

After adding the PSAR to the chart I go in manually and edit its appearance settings. But this is a heck of a good suggestion for down the road once I'm confident everything is locked in.

Also liked your suggestion on changing the setting of the UniR T2R6 (change the last setting from a 6 to a 5). This is a big move and affects everything else down the line (such as indicator readings). But its just the kind of thing where you make one slight change and the whole landscape changes.

Reply With Quote
Thanked by:
  #16 (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


Fugitive69 View Post
After adding the PSAR to the chart I go in manually and edit its appearance settings. But this is a heck of a good suggestion for down the road once I'm confident everything is locked in.

Also liked your suggestion on changing the setting of the UniR T2R6 (change the last setting from a 6 to a 5). This is a big move and affects everything else down the line (such as indicator readings). But its just the kind of thing where you make one slight change and the whole landscape changes.

I posted the latest update to that earlier posting with comments as update. So just take a look above.

@fugutive69, As mentioned before Renko bars are notoriously erratic for strategy Analysis. What makes things worse is they are not able to use "Tick Replay" that forces the ticks in the original millisecond they occurred. Just ran another Strategy Analyzer using multiple offsets to the exits. They are all coming back with the same result. This might be accurate but of course concerns me.

We can keep tweaking this but need the real time runs to confirm we are accurate. So please do not rely on this to do a live trade. Of course you can use it for entries and then monitor and manually handle the trade. The initial issue is that the strategy often exits within a few ticks if there is no "run." So be careful. Also recall that a trade can have the trail stop ended and then can add an ATM to the position by right clicking on the position in the position tab. I really like this feature of NT8.

Once you determine what parts of the above strategy you like please rename without the JMONT and put it into the create strategy free thread to ask for additional help from knowledgable coders. They will likely break the ability to use Strategy Builder but perhaps we can emulate some of it here.

Congratulations -- this is the best strategy I have found o far -- assuming the backtests are correct.

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105

@jmont1 - Great work on the modifications, I'm having fun twisting the knobs to see their effect. Will run live on SIM for awhile to see how things pan out.

[1] I made one change to your strategy file. This is on Tab5: The slow line was off by one digit:
.08 .2 .02 changed to
.08 .02 .02

Made this change so it will match the kKrunchV2 indicator. This shouldn't change any of the results, only the appearance on the chart (as far as I can tell).

So with this one change the file has been saved and I will use as the new base template file. Anything else I decide to change from here will be under a new file name. We'll keep this one as the base to work from.

[2] For my live testing I'm using UniR T2R5 instead of the original "6" for reversal. As you mentioned previously this yields dramatically better results in the analyzer. Have my fingers crossed we can see similar results during live testing.

Thanks a million, I feel light years ahead of the progress of even one day ago.

Attached Thumbnails
Click image for larger version

Name:	psar-changes-jmont1.png
Views:	293
Size:	8.8 KB
ID:	259833  
Reply With Quote
Thanked by:
  #18 (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

@Fugitive69, am rethinking the use of the range indicator since it is not really being used. I think we should drop it and thus not need the 30 second data Series. It will probably make the strategy slightly less complicated and may make strategy analysis faster.

If you decide to keep it then I would say we put in range minimum and range maximums to allow limiting entries in chop or chasing a too long a run. Looking at some strategy analysis it appears if we were to add min = 15 and max = 40 it would slightly lower the number of trades but be about the same profitability affording less commission.

I would also set the profit for 30 ticks so the chart is not as compressed by the 111. So far it looks like it is only getting to about 24 ticks profit at most -- makes sense since runs of +24 are rare without at least one pull back.

Let me know if you approve either removing the range or adding adjustable settings.

Thanks


Update: No trades yet on this day the market is closed == 11 am -- was hoping to see one live one.

Started this thread Reply With Quote
Thanked by:
  #19 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105


jmont1 View Post
@Fugitive69, am rethinking the use of the range indicator since it is not really being used. I think we should drop it and thus not need the 30 second data Series. It will probably make the strategy slightly less complicated and may make strategy analysis faster.

If you decide to keep it then I would say we put in range minimum and range maximums to allow limiting entries in chop or chasing a too long a run. Looking at some strategy analysis it appears if we were to add min = 15 and max = 40 it would slightly lower the number of trades but be about the same profitability affording less commission.

I would also set the profit for 30 ticks so the chart is not as compressed by the 111. So far it looks like it is only getting to about 24 ticks profit at most -- makes sense since runs of +24 are rare without at least one pull back.

Let me know if you approve either removing the range or adding adjustable settings.

Thanks

Yes, go ahead and make the changes - your suggestions make very good sense.
Maybe in some other strategy the range indicator can come into play as it looks to be a valuable tool. Plus, it's fun to watch.

Reply With Quote
Thanked by:
  #20 (permalink)
 Fugitive69 
Austin, TX
 
Experience: Intermediate
Platform: NT8
Trading: EU, SP, Crude CL
Posts: 90 since Jul 2018
Thanks Given: 33
Thanks Received: 105



Quoting 
Added PSAR on chart – looks like you add that to the chart aside from the strategy and it is a line. But I juast left it as dots since I did not want to edit @PSAR although we probably could. If you want to edit an “ @ “ indicator you usually can do it by renaming it without the @ - make the mod and then rename adding back the @ using File Explorer for the renaming.

I think I need to take your suggestion here. Twice the strategy has turned itself off while running and I had to go back in and manually check the "Enabled" box to turn it back on. My hunch is that I created an internal conflict which caused the shut down.

While the strategy was running I clicked into the chart indicators and changed the dots to lines, as well as the color of the lines. I feel making these changes in appearance while the bot was running is what created the conflict and caused the shut down.

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