TSSuperTrend Strategy error - NinjaTrader Programming | futures io social day trading
futures io futures trading


TSSuperTrend Strategy error
Updated: Views / Replies:8,861 / 32
Created: by Azzzz Attachments:13

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 13  
 
Thread Tools Search this Thread
 

TSSuperTrend Strategy error

  #11 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,216 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary


pgabriel View Post
I had the same problem ..

BTW...can anyone show me how to"round to tick size" the indicator values in TSSupertrend...so that the indicator plots and values always show tick size increments...?

try

Instrument.MasterInstrument.Round2TickSize(Close[0]);

Reply With Quote
 
  #12 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: Ninjatrader, TOS
Broker/Data: Amp Futures/CQG/IB
Favorite Futures: ES, ZB, ZN, Forex
 
john2000's Avatar
 
Posts: 162 since Jan 2010
Thanks: 243 given, 59 received

Thanks azzzz - I will give it another go.

John

Reply With Quote
 
  #13 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

ALMOST On topic


OK >.. still talking about TSST strategies ... I started to play with the version that was posted by LostTrader, and my ideas was to enum-it to allow optimization on calculation mode, moving average period, and type of moving average to use. I did find some examples on the NT forum, but the final solution eludes me for some reason.

The period I have ok ... but trying to get the mode and matype gets me as far as having the dropdowns in the strategy dialogue, but there is no change in the screen chart ... I am fairly sure modifying the lines around #80 in the attached will fix ... but ... on how to have it without errors in compiles ...

I added comments to help out anyone that can have a look ... NT7b19 compiled but not exported ... I use TSST 2.3

TIA!
Jon

PART TWO: progress made but not to the finish line yet

I have a 'simple' version of TS SuperTrend in a very bare bones type of strategy, built on the framework of the MACD Crossover strategy posted in the NT forums... HUGE thanks to Art Runelis for the TSST and to NT_Josh for the framework http://www.ninjatrader.com/support/f...catid=5&id=393 ...
and I also have a 'not simple' version that I cannot resolve these errors (each time I try it gets MUCH worse) when I try to use enums instead of hard code of some of the variables/options available in the TSST .. I am using the enums because I want to be able to optimize extensively and there are just a lot of possibility .. let the machine do the work

These are the errors are with compiler code and line#s for those that can help me out:

Invalid token '{' in class, struct, or interface member declaration, CS1519 154
Namespace does not directly contain members such as fields or methods, CS0116 155
Type or namespace definition, or end-of-file expected, CS1022 176
Namespace member declaration expected. 153
Namespace member declaration expected 175

The strategy without the enums compiles and runs in NT7b19, not optimized, only raw version .. with the enums it does not compile. Only posting the .cs as all else you need you should have already TSST v2.3 and the rest is in the NT7.

Please post here if you can make the enum version work.

Thanks to all!
Jon

Attached Files
Register to download File Type: cs TSST_v02.cs (24.5 KB, 46 views)

Last edited by Trader.Jon; August 14th, 2010 at 01:50 AM. Reason: updated efforts
Reply With Quote
 
  #14 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

Rounder(s)


cory View Post
try

Instrument.MasterInstrument.Round2TickSize(Close[0]);

Cory,

Does that round up or round down ?

Jon

Reply With Quote
 
  #15 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

Editing in my dreams

Seems I can edit a message but not add more files ... here are the .cs I am working with if there are guru's here that can fix I will be immensely greatful!

Jon

update: now in this thread https://futures.io/ninjatrader-programming/2599-tssupertrend-optimizer.html#post56367

Attached Files
Register to download File Type: cs MACDCrossOver_w_TSSTenum.cs (6.2 KB, 25 views)
Register to download File Type: cs MACDCrossOver_w_TSST.cs (5.4 KB, 26 views)

Last edited by Trader.Jon; August 14th, 2010 at 02:47 PM. Reason: duplicate efforts
Reply With Quote
 
  #16 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: Ninjatrader, TOS
Broker/Data: Amp Futures/CQG/IB
Favorite Futures: ES, ZB, ZN, Forex
 
john2000's Avatar
 
Posts: 162 since Jan 2010
Thanks: 243 given, 59 received


tarantino View Post
I have a sample SuperTrend strategy which compiles fine.

Tarantino,

Thanks for TSSuperTrendstrategySample.zip, but I still have the following errors when I try to compile! It all seems to be internal to the strategy . . .

John

Attached Thumbnails
TSSuperTrend Strategy error-2010-09-21_0549supertrenderror.png  
Reply With Quote
 
  #17 (permalink)
Trading Apprentice
Willowbrook, IL
 
Futures Experience: None
Platform: Windows 7, Android
Favorite Futures: Mouse and Keyboard
 
tarantino's Avatar
 
Posts: 32 since Sep 2010
Thanks: 71 given, 39 received


john2000 View Post
Tarantino,

Thanks for TSSuperTrendstrategySample.zip, but I still have the following errors when I try to compile! It all seems to be internal to the strategy . . .

John

Are you able to import it?

Reply With Quote
 
  #18 (permalink)
Trading Apprentice
Willowbrook, IL
 
Futures Experience: None
Platform: Windows 7, Android
Favorite Futures: Mouse and Keyboard
 
tarantino's Avatar
 
Posts: 32 since Sep 2010
Thanks: 71 given, 39 received

Moderators, please remove the attachment from post #16. The code includes VendorLicense call method which I forgot to remove. It confuses users and I can not edit the post (Why? It is my post...)

Thanks.

Reply With Quote
 
  #19 (permalink)
Elite Member
U.S.A.
 
Futures Experience: Advanced
Platform: NinjaTrader
 
Posts: 19 since May 2010
Thanks: 5 given, 11 received

TSSuperTrend

Ok,

I tested the suggested TSSuperTrend Test and this is some of my code that works as follows:

// Condition set 1
if (Close[0] > Close[1] &&
TSSuperTrend(
14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[0] > TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[1])
{
double arrowpositionup = TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[0] - 1*TickSize;
DrawArrowUp(
"My up arrow" + CurrentBar, false, 0, arrowpositionup, Color.Lime); // I used arrows but you use your own commands // can use "Low[0]-3* TickSize" for position instead
}
// Condition set 2
if (Close[0] < Close[1] &&
TSSuperTrend(
14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[0] < TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[1])
{
double arrowpositiondn = TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[0] + 1*TickSize;
DrawArrowDown(
"My down arrow" + CurrentBar, false, 0, arrowpositiondn, Color.Red);
}

Attached Thumbnails
TSSuperTrend Strategy error-bg_main.jpg  
Reply With Quote
 
  #20 (permalink)
Membership Revoked
United States of America
 
Futures Experience: Advanced
Platform: NT
 
Posts: 1,149 since Aug 2009
Thanks: 262 given, 471 received



bill897 View Post
Ok,

I tested the suggested TSSuperTrend Test and this is some of my code that works as follows:

// Condition set 1
if (Close[0] > Close[1] &&
TSSuperTrend(
14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[0] > TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[1])
{
double arrowpositionup = TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).UpTrend[0] - 1*TickSize;
DrawArrowUp(
"My up arrow" + CurrentBar, false, 0, arrowpositionup, Color.Lime); // I used arrows but you use your own commands // can use "Low[0]-3* TickSize" for position instead
}
// Condition set 2
if (Close[0] < Close[1] &&
TSSuperTrend(
14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[0] < TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[1])
{
double arrowpositiondn = TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR).DownTrend[0] + 1*TickSize;
DrawArrowDown(
"My down arrow" + CurrentBar, false, 0, arrowpositiondn, Color.Red);
}

So, what are you suggesting we do with this?

Reply With Quote

Reply



futures io > > > > > TSSuperTrend Strategy error

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
TSSuperTrend togier NinjaTrader 7 July 2nd, 2012 03:48 PM
My First MTF Strategy .. need some minor error fixes Trader.Jon The Elite Circle 4 May 14th, 2010 09:58 PM
Strategy Analyzer Error jeffbg123 NinjaTrader Programming 3 April 8th, 2010 09:17 PM
DoubleMA strategy error dsraider NinjaTrader Programming 5 January 25th, 2010 04:13 PM
Logic Error in Strategy HJay NinjaTrader Programming 14 November 1st, 2009 07:05 PM


All times are GMT -4. The time now is 02:59 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.28 seconds with 40 queries on phoenix via your IP 54.226.132.197