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,983 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 1 attachments




 
Search this Thread
  #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?
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
CFTC Launches Innovation Task Force for AI Trading Syste …
Traders Hideout
CME Cuts Precious Metals Margins Up to 21% Starting Toda …
Commodities
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 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 
Bangkok, Thailand
Legendary Scalper
 
Experience: Master
Trading: NQ 1 Min.
Posts: 978 since Dec 2010
Thanks Given: 707
Thanks Received: 2,307

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
Legendary Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,951 since Dec 2010
Thanks Given: 3,042
Thanks Received: 2,397

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: [wiki=NT-Local-Order-Manager-LOM-Guide][/wiki]
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: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,802 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


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 X Reply With Quote




Last Updated on May 5, 2012


© 2026 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 - Downloads - Top
no new posts