![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Is it possible to have long/short orders to be placed according
to the color of the price bars on a chart? Or does one have to code every single thing into a strategy as to how the price bars have been given their color? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
There is not function to place order per the color of the bar, sorry.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Thanks Ben. I am thinking about a strategy
using Renko bars. Would I have to code the parameters of a Renko bar, that is, within the strategy? If you know of this being done I'd appreciate the link.
Last edited by stephenszpak; 06-14-2009 at 11:51 AM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
You can code this within the strategy or create an indicator that a plot that is accessable to your strategy. I recommend searching the forum with the search feature and/or looking in the file sharing section of the forum.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Ben
Ok, just to make sure about this. If I format the data series to Renko and create a 4 tick chart, will a Ninja Strategy accept the closing prices created by the Renko as valid,that is, just as valid as if it were a standard bar chart? You said somewhere that Renko is not a supported capability of NT. (Sorry, I'm positive this is a simple question, but I just don't know.) I just found this on page 484 of the manual. { // Add a 5 minute Bars object - BarsInProgress index = 1 Add(PeriodType.Minute, 5); // Add a 100 tick Bars object for the ES 12-06 contract - BarsInProgress index = 2 Add("ES 12-06", PeriodType.Tick, 100); // Charts a 20 period simple moving average to the chart Add(SMA(20)); } { Maybe something like this would be what we're talking about: // to get 100 Renko bars Add("ES 12-06", PeriodType.Renko, 100); // to make the Renko a 4 tick Add (PeriodType.Renko,4); // to add a 3 SMA to that Add(SMA(3)); }
Last edited by stephenszpak; 06-15-2009 at 12:14 AM.
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: May 2008
Location: Hartford, CT. USA
Posts: 618
Thanks: 13
Thanked 24 times in 18 posts
|
Stephen,
It has been my experience that only chart types that are reconised by intellisense can be added in this manner. Renko is not one of them. ![]() RJay |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Unfortunately Renko bars are a 3rd party addon and we do not know if you can use them or not.
You could try just going PeriodType.Renko and see if that works. Otherwise unfortunately you would need to contact the vendor to see if they know.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#8 | |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Quote:
It doesn't seem to recognize Renko as you stated. Any suggestions at this point would be appreciated (by anyone). The Renko code was made by a NT person. I'll try to search who did it. Maybe they have an idea. Did the search. I think it was roonius. His program: 'Renko bars' is what I downloaded (I think) a number of days ago. I found/opened his program using notepad. (I can post it if necessary.) Should it be installed within a strategy in its entirety to create a Renko strategy of some sort. Thanks, - Stephen
Last edited by stephenszpak; 06-20-2009 at 09:49 PM.
|
|
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,547
Thanks: 261
Thanked 1,012 times in 993 posts
|
Stephen, is this a MultiTimeFrame / Instrument strategy you want to code up? If not you can simply run your existing strategy on the Renko bars type, there's no explicit coding to the Renko bars type needed then.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#10 | |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Quote:
would simply be Renko bars as a single time frame strategy. Well to update, I just did this: protected override void OnBarUpdate() { Add("ES 12-06", PeriodType.Renko, 100); Add (PeriodType.Renko,4); Add(SMA(3)); } This is NOT what I want in the end, however the 'Strategy was successfully generated'. There still is hope.
Last edited by stephenszpak; 06-21-2009 at 12:39 AM.
|
|
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,547
Thanks: 261
Thanked 1,012 times in 993 posts
|
Stephen, for a single timeframe strategy running on Renko bars, just create your chart using the Renko bars type and run your strategy on it (for a quick demo, just use the SampleMACrossOver). You would not have to Add() the Renko bars for this to be working in a strategy using just one Renko chart.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
This is what I got. Nothing to see really, but it does work.
I checked the strategy's code. It doesn't specify much of anything, so you were right, it doesn't matter. |
|
|
|
|
|
#13 | |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Quote:
If I wished to develop a strategy using a short term and long term Renko bar tick, like 3 tick and 7 tick, would this be possible? I looked at the Renko code that actually displays the basic Renko chart and I must say it is extremely complex and long as far as I'm concerned. Would I have to use this code (I can post if necessary) within a two tick (7 tick and 3 tick) strategy, or is there a much simpler way? |
|
|
|
|
|
|
#14 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,547
Thanks: 261
Thanked 1,012 times in 993 posts
|
Stephen, as stated earlier this is a custom barstype and you would need to contact the original author to check if and how it workds in multi series environments, if you want to got with a supported one, you can check the Range bars out and Add() them via Add(PeriodType.Range, 4).
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#15 | |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Quote:
I contacted him. Maybe it wasn't him or maybe he is occupied. No response as yet. Maybe I can do something with the Add() stuff. Lost my train of thought on this as the days have past. From what you said it seems possible though. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 3 color Heiken bars | stephenszpak | Indicator Development | 7 | 05-25-2009 12:46 PM |
| color price bars and volume bars the same | mikeytrader | General Programming | 1 | 05-11-2009 07:52 AM |
| Color bars | qkracer | Indicator Development | 10 | 12-26-2007 11:22 PM |
| Sma To Plot Color Bars Not Lines | avlasov | Indicator Development | 4 | 12-08-2007 03:37 PM |
| Color Volume Bars Indicator (Download) Version 5 Only | awuit | Indicator Development | 3 | 11-29-2007 04:25 PM |