NexusFi: Find Your Edge


Home Menu

 





AnaSupertrend minor modification possible?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Sufyan with 4 posts (0 thanks)
    2. looks_two Fat Tails with 3 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 cory with 1 posts (0 thanks)
    1. trending_up 1,703 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread

AnaSupertrend minor modification possible?

  #1 (permalink)
 Sufyan 
toronto
 
Experience: Intermediate
Platform: metatrader
Trading: forex
Posts: 22 since Oct 2013
Thanks Given: 0
Thanks Received: 31

Hi guys, I was wondering if someone could make a minor tweak to FatTails anasupertrend indicator.

Is it possible to add "percent offset" to the offset types?

Right now the only offset types offered are;

1) Standard Deviation
2) True Range
3) Simple Range

I would like the ability to offset the supertrend using a "Percent offset" like the one found in the built NT indicator "MA envelopes"

See the picture below


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Feasible, but it would change the characteristics of the indicator. Currently, the distance of the stop value depends on volatility. It goes further away when volatility is high and approaches price, when volatility is low.

With a percentage selection, the stop will be trailed at a fixed distance - well mostly fixed - of the moving average.

The modification requires a few changes, mostly in OnStartUp(). Also a new property has to be added for the percentage value.

Reply With Quote
  #4 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


Sufyan View Post
...

Is it possible to add "percent offset" to the offset types?

...

you may want to try TMFTtrailingstoppercent

Reply With Quote
  #5 (permalink)
 Sufyan 
toronto
 
Experience: Intermediate
Platform: metatrader
Trading: forex
Posts: 22 since Oct 2013
Thanks Given: 0
Thanks Received: 31


cory View Post
you may want to try TMFTtrailingstoppercent

Thanks cory, but that indicator does not allow me to define the length of the moving average (nor the type of the moving average). Its simply a trailing stop (im assuming using 1 period)


Fat Tails View Post
Feasible, but it would change the characteristics of the indicator. Currently, the distance of the stop value depends on volatility. It goes further away when volatility is high and approaches price, when volatility is low.

With a percentage selection, the stop will be trailed at a fixed distance - well mostly fixed - of the moving average.

The modification requires a few changes, mostly in OnStartUp(). Also a new property has to be added for the percentage value.

Hi Fattails, yes that is what I'm interested in. I've never had much luck using ATR, I prefer a fixed amount. So far i've been using my MA-envelopes settings, and then adjusting the anaSupertrend using std deviation and attempting to line it up to the MA envelope settings, but because it is volatility based, the two bands slip apart over time.

I like the ana-supertrend for its versatility with paintbars and multitude of moving averages, But I would really love the ability to use a fixed percentage stop rather than basing it on volatility.

Any help would be appreciated greatly.

Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Sufyan View Post
Thanks cory, but that indicator does not allow me to define the length of the moving average (nor the type of the moving average). Its simply a trailing stop (im assuming using 1 period)



Hi Fattails, yes that is what I'm interested in. I've never had much luck using ATR, I prefer a fixed amount. So far i've been using my MA-envelopes settings, and then adjusting the anaSupertrend using std deviation and attempting to line it up to the MA envelope settings, but because it is volatility based, the two bands slip apart over time.

I like the ana-supertrend for its versatility with paintbars and multitude of moving averages, But I would really love the ability to use a fixed percentage stop rather than basing it on volatility.

Any help would be appreciated greatly.


You would also get a fixed percentage stop, if you use a long period for the offset period. For example, if you select an offset period of 255, this is basically a fixed stop.

I would even say that the solution with a slow offset is much better that a percentage offset. Unlike the percentage offset

- it adjusts to the beta of the instrument (volatility is not based on the absolute prices)
- the same setting can be used with all instruments and timeframes

In my opinion you do not gain anything, when the percentage offset is added.

Reply With Quote
  #7 (permalink)
 Sufyan 
toronto
 
Experience: Intermediate
Platform: metatrader
Trading: forex
Posts: 22 since Oct 2013
Thanks Given: 0
Thanks Received: 31


Fat Tails View Post
You would also get a fixed percentage stop, if you use a long period for the offset period. For example, if you select an offset period of 255, this is basically a fixed stop.

I would even say that the solution with a slow offset is much better that a percentage offset. Unlike the percentage offset

- it adjusts to the beta of the instrument (volatility is not based on the absolute prices)
- the same setting can be used with all instruments and timeframes

In my opinion you do not gain anything, when the percentage offset is added.

Indeed with a long MA it smooths out. Problem my trading system uses a 34 SMA period (along with some other indicators). That is what I have back-tested, and the few tick differences in the Volatility vs Fixed stop are enough to alter my results. I havent gotten a chance to properly backtest futures since I dont have access to that indicator, but on my forex account I was getting about 53-55% over almost 25,000 trials in backtest data (using 1,000 sample chunks on different pairs on different time frames)

I've been doing some manual testing on futures and its really time consuming lol. So far over 300 sample or so, I'm getting +61% using my normal strategy (using fixed stop) and getting 43% when I use the volatility based stop. Im still new to futures and Ninjatrader so I'm trying to figure out all the biases/problems involved with backtesting on ninjatrader before I backtest properly. But I really need help if someone can assist me in adding a "percent offset" feature to anaSuperTrend

I just dont have any experience using volatility stop, and all my testing and prior studies have been using fixed stops.

Maybe if fattails is busy, someone else can help (btw are we allowed to edit your indicators fattails?)

Thanks again

Started this thread Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Sufyan View Post
Indeed with a long MA it smooths out. Problem my trading system uses a 34 SMA period (along with some other indicators). That is what I have back-tested, and the few tick differences in the Volatility vs Fixed stop are enough to alter my results. I havent gotten a chance to properly backtest futures since I dont have access to that indicator, but on my forex account I was getting about 53-55% over almost 25,000 trials in backtest data (using 1,000 sample chunks on different pairs on different time frames)

I've been doing some manual testing on futures and its really time consuming lol. So far over 300 sample or so, I'm getting +61% using my normal strategy (using fixed stop) and getting 43% when I use the volatility based stop. Im still new to futures and Ninjatrader so I'm trying to figure out all the biases/problems involved with backtesting on ninjatrader before I backtest properly. But I really need help if someone can assist me in adding a "percent offset" feature to anaSuperTrend

I just dont have any experience using volatility stop, and all my testing and prior studies have been using fixed stops.

Maybe if fattails is busy, someone else can help (btw are we allowed to edit your indicators fattails?)

Thanks again

Any one is allowed to edit the indicators. They come open source. If you modify them, please do not use the prefix "ana" but change it to something else to avoid confusion.

Reply With Quote
Thanked by:
  #9 (permalink)
 Sufyan 
toronto
 
Experience: Intermediate
Platform: metatrader
Trading: forex
Posts: 22 since Oct 2013
Thanks Given: 0
Thanks Received: 31

Okay will do

Started this thread Reply With Quote




Last Updated on February 18, 2015


© 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