script idea - NinjaTrader Programming | futures io social day trading
futures io futures trading


script idea
Updated: Views / Replies:10,163 / 64
Created: by sharky Attachments:14

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
 14  
 
Thread Tools Search this Thread
 

script idea

  #31 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received

The yellow line issue, discussed at length in chat, is due to the precision being used in DoubleMA Paint. What is painted on screen vs. what is passed in the DataSeries is different due to this math rounding (precision).

Approximately line 147 the rounding begins. I'm not the original author and do not know why the rounding is necessary.

If you replace:
double val1 = Math.Round( val1Pure, decimals );
double val2 = Math.Round( val2Pure, decimals );

with:
double val1 = Math.Round( val1Pure, 6 );
double val2 = Math.Round( val2Pure, 6 );

Then the issue with the yellow color should be fixed on the ZN instrument.

If someone wants to get more at the heart of this for a real solution, the logic to determine the number of decimals begins on line 83 of DMAPaint.cs.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #32 (permalink)
Elite Member
Brisbane; Australia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: IB/TDA needing new broker
Favorite Futures: Futures, Forex, Stocks
 
Peter's Avatar
 
Posts: 97 since Jun 2009
Thanks: 91 given, 101 received

The versions are in fast development. Here are the latest....

The ZIP contains 2 variants of the same strategy
- SharkyMAStrategy_v1_05
- SharkyMAStrategy_v1_05_DMV_version

The first version uses the Signal dataseries to trigger entries and exits
The second (even more experimental) DMV version uses the DMV dataseries in DMAPaint to trigger entries/exits.

The ZIP includes:
- an updated DMAPaint and updated DMA with:
1. Mike's fix as per previous post
2. updated DMAPaint to default PaintBar=false (so it does not repaint the bars by default
when putting the the DMAPaint or DMAPaint containing strategy on a chart)
3. DMA changed to PriceSupported = true
- my updated Internal (adds TEMA, ZeroLagTEMA and ZeroLagHATEMA as choice) .


For details see earlier posts

The strategies are work in progress ... do not use for real trading

Just (8.00 AM) uploaded again a new version. Found logical error in the DMV version that prevented it going short.
(8.32 AM) It looks like there is still a bug in the logic of the DMV version as it re-enters while the code should prevent this.
But still useful to see if using the DMV dataseries gives different entries than using the Signal dataseries

As Max suggested and we discussed in the chat it might be better to hardcode the logic directly without using the DMAPaint
with e.g. statements like .......if ZerolagEMA(ZeroLagEMA,13),13
[0] > ZeroLagEMA(ZeroLagEMA,13)13 [1] etc.
We agree that this is probably the best way forward. But that's for another day .... or one of the others to pick up.


8.15 PM I checked what the 2 versions did last night. The version based on the DMA Signal dataseries and the version based on the DMA DMV dataseries definitively triggered differently.
I think somebody else better first checks the trigger logic. You tend to miss flaws in your own coding.


As mentioned yesterday it is probably better as next step to first hard code the logic in the strategy with statements like
- ZerolagEMA(ZeroLagEMA,12),12 [0] > ZeroLagEMA(ZeroLagEMA,12)12 [1]
- or
ZerolagEMA(ZeroLagEMA,12),12 rising etc.
That way we would no longer be dependent on the inside logic of the DMSPaint indicator.
With 'hardcoding' I mean here 'not using the DMA'. I would still make the period of the ZeroLagEMA a changeable parameter.


That would give then 3 versions to compare and evaluate the efficacy / correctness of the triggers.
It is fun the develop on the fly, but IMO we need to get a little structured in the approach.

Don't know if it is wise to already put in break-even and ATM type stuff and complicate the strategy before solving the first part.

Will have little time rest of the week ... so if somebody wants to pick up ... pls do


Attached Files
Register to download File Type: zip SharkyMAStrategy_v1_05c__2versions.zip (48.3 KB, 88 views)

Last edited by Peter; June 29th, 2009 at 10:19 PM. Reason: Put correct DMV version in
Reply With Quote
The following 4 users say Thank You to Peter for this post:
 
  #33 (permalink)
Just starting out...
Rocky Mountains
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: ZenFire
Favorite Futures: ES
 
systrader's Avatar
 
Posts: 19 since Jun 2009
Thanks: 17 given, 35 received


Back from a long weekend. Looks like a lot has changed in the script(s)! I'll try to catch up and figure out what all has changed. Let me know if I can help with anything.

Reply With Quote
 
  #34 (permalink)
Elite Member
Toronto Canada
 
Futures Experience: Intermediate
Platform: ninja Trader, Ensign,Market Delta
Broker/Data: AMP,Global Futures
Favorite Futures: Eminis
 
Posts: 97 since Jun 2009
Thanks: 46 given, 83 received

Thanks for posting this idea . I have one idea about profit management. If you make it to configure profit management through ATM strategy, then it will be better.

Reply With Quote
The following user says Thank You to KJAVED for this post:
 
  #35 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

systrader,

I'm curious if your strategies are normally using ATM strategy or IORDER?

I've not conquered either one yet but have samples of each and am still learning the nuances.

Also, are you normally using Add(name of indicator) in Initialize? or do you just add the indicator separately?

Kirk

Reply With Quote
 
  #36 (permalink)
Elite Member
Toronto Canada
 
Futures Experience: Intermediate
Platform: ninja Trader, Ensign,Market Delta
Broker/Data: AMP,Global Futures
Favorite Futures: Eminis
 
Posts: 97 since Jun 2009
Thanks: 46 given, 83 received

I am not Programmer. But have some knowledge. I hire some ninja script consultants before my strategies. They configure it for me. Your all strategy ok, working good, except profit management. For profitmanagement, you can make as manay ATM strategies as you want and just put there name at start of strategy from strategy wizard. Then it automatically picks that specific ATM strategy.
When this happen, then there is no need to give profit/loss/trail tragets inside strategy. You can run as many strategies as you want on different charts of same market as you want, from same wizard, just changing there names.

Reply With Quote
 
  #37 (permalink)
Just starting out...
Rocky Mountains
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: ZenFire
Favorite Futures: ES
 
systrader's Avatar
 
Posts: 19 since Jun 2009
Thanks: 17 given, 35 received

Kirk,

Up to this point I've only used the built in order handling functions. I have yet to do advanced order handling via IOrder. I have played with ATM strategies a little but nothing earth shattering I'm still in the process of learning the ins/outs of NT (and this forum is a HUGE help).

What KJAVED spoke about sounds interesting as well (eg. pre-configured ATM strategies that a strategy uses). But being a programmer, I will probably end up "coding" my order/profit/stop logic vs. using a pre-configured ATM - but it's nice that NT gives you the ability to do both.

Reply With Quote
The following user says Thank You to systrader for this post:
 
  #38 (permalink)
Elite Member
MIAMI,FL
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Private
Favorite Futures: Zn,6E,6J
 
sharky's Avatar
 
Posts: 1,060 since Jun 2009
Thanks: 624 given, 3,875 received

Sam,peter,sy trader or anyone else

I am interested in testing this strategy Monday for quick scalps, and I would like to revise it to include the following:

I do not want to employ a TrailStop, so set TrailStop default = 0 (not = 1 as it currently is).

I do want an Auto Breakeven feature that once open profit = 2 ticks (set as variable), I want to automatically move my Stop Loss to Entry. This protects my position if my Profit Target is hit but I am not filled, and price then moves against me.

This feature in the ATM Stop Strategy would read as follows:

Auto breakeven (ticks)
Profit trigger: 2 (set as variable) Plus: 0 (set as variable)

Reply With Quote
 
  #39 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

I've had good success with an ATM strategy that both sets targets and sets stops (even different levels if desired) and then moves the level to breakeven or breakeven + 1tick (to pay for commissions if needed).

SampleAtmStrategy is a built-in script that you could start with if that's the way you're going.

hth

kirk

Reply With Quote
 
  #40 (permalink)
Elite Member
MIAMI,FL
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Private
Favorite Futures: Zn,6E,6J
 
sharky's Avatar
 
Posts: 1,060 since Jun 2009
Thanks: 624 given, 3,875 received


any one with ideas feel free to make suggestions all ideas will be looked at and if possible we will try anything to make this a really good script...sharky

Reply With Quote

Reply



futures io > > > > > script idea

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
is having a trading buddy/s a good idea anniebee321 Psychology and Money Management 14 July 22nd, 2017 11:40 AM
Want to create an indicator and have no idea where to start? forrestang NinjaTrader Programming 93 January 20th, 2012 08:33 PM
Will pay you , If You Code This Idea For Me . . . . jmejedi NinjaTrader Programming 11 January 30th, 2011 02:05 AM
Strategy Idea soumi71 NinjaTrader Programming 30 December 2nd, 2009 03:58 PM
Downloads/File Sharing: Just an Idea Prtester Feedback and Announcements 2 June 17th, 2009 08:51 PM


All times are GMT -4. The time now is 02:08 PM.

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-15 in 0.14 seconds with 20 queries on phoenix via your IP 54.82.56.95