NexusFi: Find Your Edge


Home Menu

 





Strategy help on Kagi & Uni Renko etc.


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one KennyK with 7 posts (0 thanks)
    2. looks_two rleplae with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 marpol with 1 posts (1 thanks)
    1. trending_up 3,094 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 9 posts
    2. attach_file 1 attachments




 
Search this Thread

Strategy help on Kagi & Uni Renko etc.

  #1 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24

HI, I am trying hard to code a strategy and need a bit of help.
Firstly I wish to know if what I want to do is doable?
That is as follows:
The strategy would be placed on a Kagi chart, (don't know if that makes any difference or not)?
The trade entry and exit signals will come from the Kagi chart.
The trend direction is determined from an ATR trailing indicator on a Uni Renko chart.
I have tried to add the Uni Renko data series to my strategy, but without success.
If all the above is possible, then I need to set the properties for the ATR Trailing, Uni Renko and Kagi bars, within the strategy as user defined, but with a default that I want to program in.
I have watched the webinar of Scott Hodson, which was very informative, creating the Cesar Salad strategy, and have basically followed his example as much as I can, but some of what I want to do is outside the scope of his example.
If I can get some feedback on the above I will then have some further questions.
Thanks,
Ken.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


You want to do this in NT7 or NT8

Maybe you want to upload what you have already ?

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24


rleplae View Post
You want to do this in NT7 or NT8

Maybe you want to upload what you have already ?

I am in NT8. I would have already uploaded what I have but can't export it. I think it must be because it is incomplete? It has compiled though. I will try again, but don't know if I will be able to?

Started this thread Reply With Quote
  #5 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24


rleplae View Post
You want to do this in NT7 or NT8

Maybe you want to upload what you have already ?

Ok, I found the problem why I couldn't export, although it compiled in the editor it didn't compile suitably for export due to the following error: CS0246. I did add a using declaration for bar types which I thought would cover that, but obviously it didn't. So I had to disable the code responsible, the declarations at the top.

Anyhow the file has been uploaded. Feedback really appreciated.

Attached Files
Elite Membership required to download: KagiSwinger.zip
Started this thread Reply With Quote
  #6 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24

I forgot to mention....
I had written some code in "On Bar Update()", but deleted it because it was causing errors.
It was something like this:

bool LongTrend {get { return CurrentBar > this._ATRTrail;}
Bool ShortTrend { get { return CurrentBar < this._ATRTrail;}

The problem was with the < > operators. Said I couldn't use them with the indicator.

If you need clarification on any thing I will be happy to provide more details.

Started this thread Reply With Quote
  #7 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24

I found this elsewhere posted by WoodyFox, which will help.

For those looking to AddDataSeries for UniRenko
Here it is;

else if (State == State.Configure)
{
AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)20, Value = 5, Value2 = 15 });
}

5 = Tick Trend
15 = Tick Reversal

Trend and Reversal can be set to whatever you need.

Started this thread Reply With Quote
  #8 (permalink)
 marpol 
San Francisco, CA
 
Experience: Advanced
Platform: IB-TWS, Ninja, Wave59, R
Broker: IB, IQFeed
Trading: ZB
Posts: 37 since Sep 2013
Thanks Given: 0
Thanks Received: 26

I have not looked at your code yet, but have some experience with renko/uni renko charts. I highly recommend you back test your strategy manually (at least a few trades) to make sure it works. I say this because Renko/uni renko charts re-print and have false opens. So if you write a strategy around it sometime you can have crazy slippage. Sometimes it looks good on the chart, but you need to bring up a basic time (like a 1 min) chart or a tick chart and see were your fill will really be. As a not if it is an automated strategy it will be almost impossible to backtest with any confidence.....just an fyi.

Not saying it is not good strategy or it wont work. I have just personally spent hours of wasted programing time on Uni Renko strategies that look great in testing and didn't realize i had 10 ticks of slipage on both sides of my (real) trades.

Reply With Quote
Thanked by:
  #9 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24


marpol View Post
I have not looked at your code yet, but have some experience with renko/uni renko charts. I highly recommend you back test your strategy manually (at least a few trades) to make sure it works. I say this because Renko/uni renko charts re-print and have false opens. So if you write a strategy around it sometime you can have crazy slippage. Sometimes it looks good on the chart, but you need to bring up a basic time (like a 1 min) chart or a tick chart and see were your fill will really be. As a not if it is an automated strategy it will be almost impossible to backtest with any confidence.....just an fyi.

Not saying it is not good strategy or it wont work. I have just personally spent hours of wasted programing time on Uni Renko strategies that look great in testing and didn't realize i had 10 ticks of slipage on both sides of my (real) trades.

HI,
i am only using the UniRenko chart for detecting the trend with the ATR Trailing indicator.
Execution would be based on the Kagi chart.
Thanks for you concern though, it's good to know in any case.

Started this thread Reply With Quote
  #10 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24


What would the logic look like to do this, which is explained in English?
LongTrend = UniRenko last price is = or > ATR Trailing indicator.
ShortTrend = UniRenko last price is = or < ATR Trailing indicator.

Keeping in mind this strategy refers to two different charts or data series.
The UniRenko for trend direction and the Kagi for trade execution and management.

Thanks,
Ken.

Started this thread Reply With Quote




Last Updated on April 18, 2017


© 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