NexusFi: Find Your Edge


Home Menu

 





Improve RSI Strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one jkpdon with 3 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 NJAMC with 1 posts (0 thanks)
    4. looks_4 Anagami with 1 posts (1 thanks)
    1. trending_up 3,296 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 1 attachments




 
Search this Thread

Improve RSI Strategy

  #1 (permalink)
 jkpdon 
austin,tx,usa
 
Experience: Beginner
Platform: ninjatrader
Trading: es
Posts: 31 since Dec 2010

Hello Elite Coders,

I need help adding some codes to existing RSI strategy

I have added my self 3 Targets and break even code for it but need some improvement.

1. Add Trailing Stop/Profit Feature
2.Ability Modify value of Lot1, Lot2 Lot3
3. Show Profit Loss on Chart
4. May be Chop filter

Thanks

JK

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

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Are there any eval firms that allow you to sink to your …
Traders Hideout
Futures True Range Report
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 jkpdon 
austin,tx,usa
 
Experience: Beginner
Platform: ninjatrader
Trading: es
Posts: 31 since Dec 2010


I thought this forum is very helpful but seems i m not getting any help after i became Elite member.

Started this thread Reply With Quote
  #4 (permalink)
 
Anagami's Avatar
 Anagami 
Cancun, Mexico
Legendary Market Hustler
 
Experience: Advanced
Trading: MES
Posts: 978 since Dec 2010
Thanks Given: 707
Thanks Received: 2,300

Forum members are not your servants.

You are never in the wrong place... but sometimes you are in the right place looking at things in the wrong way.
Reply With Quote
Thanked by:
  #5 (permalink)
 jkpdon 
austin,tx,usa
 
Experience: Beginner
Platform: ninjatrader
Trading: es
Posts: 31 since Dec 2010


Anagami View Post
Forum members are not your servants.

i asked for help!! read how many word help in my request.

Started this thread Reply With Quote
  #6 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394

Hi,

You should check out a more appropriate section for assistance for a Strategy:
Elite Automated Trading - Big Mike's Trading Forum

You are likely to get help with direction, but difficult for someone to jump in and complete your code the way you want it.


jkpdon View Post
Hello Elite Coders,

I need help adding some codes to existing RSI strategy

I have added my self 3 Targets and break even code for it but need some improvement.

1. Add Trailing Stop/Profit Feature
2.Ability Modify value of Lot1, Lot2 Lot3
3. Show Profit Loss on Chart
4. May be Chop filter

Thanks

JK


Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 Caveman 
Edmond,Oklahoma,United States
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: ES, CL
Posts: 19 since Sep 2010
Thanks Given: 6
Thanks Received: 30


jkpdon View Post
Hello Elite Coders,

I need help adding some codes to existing RSI strategy

I have added my self 3 Targets and break even code for it but need some improvement.

1. Add Trailing Stop/Profit Feature
2.Ability Modify value of Lot1, Lot2 Lot3
3. Show Profit Loss on Chart
4. May be Chop filter

Thanks

JK

You can set a trailing stop in NT by calling the SetTrailStop method like so:

SetTrailStop (CalculationMode.Ticks, 12);

This will set a trailing stop 12 ticks behind current price. Of course you can set the 12 to a variable displayed on the strategy window. like such:

 
Code
   public class JKRsiWithRsi : Strategy
    {
        #region Variables
        // Wizard generated variables
       private int trailstop = 12;


   protected override void Initialize()
    {
	SetTrailStop (CalculationMode.Ticks, trailstop);


   #region Properties
	[Description("Set Trailing Stop Loss in Ticks")]
        [GridCategory("Stops")]
        public int TrailingStop
        {
            get { return trailstop; }
            set { trailstop = value; }
		}
By modifying the value of Lot1,2,3 I assume you mean the quantity of orders placed? If so, you can specify how many contracts to enter in the EnterLong() and EnterShort() methods as such (using the target names in the strategy):

EnterLong(1, "target1"); // Executes a long with 1 contracts
EnterLong(2, "target2"); // Executes a long with 2 contracts
EnterLong(3, "target3"); // Executes a long with 3 contracts

To show text on the chart window, add something like this:

 
Code
   protected override void OnBarUpdate()
    {
     DrawTextFixed("Profit","Cumulative Profit: " + Performance.RealtimeTrades.TradesPerformance.Currency.CumProfit.ToString(), TextPosition.BottomRight);
Chop filters are pretty unreliable from my point of view but a decent one to look at is the adxvma by sharky which can be found in the ninjatrader section of the downloads. I think I have an older version of it, and had to edit the indicator to set the bars to paint, then look for the color of the bars as so:

ADXVMA_sharky_paint(6,true).BarColor == Color.Red // this is the short color
ADXVMA_sharky_paint(6,true).BarColor == Color.Blue // this is the long color

Hope this helps. Play around with it and see what you can do.

Caveman

Reply With Quote
  #8 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743


jkpdon View Post
I thought this forum is very helpful but seems i m not getting any help after i became Elite member.


Instead of making a new thread, perhaps your best option would have been to post here?



That seems like a better place to have it done for you.
Or perhaps find an independent programmer and pay them to do it?

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote




Last Updated on May 5, 2012


© 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