NexusFi: Find Your Edge


Home Menu

 





script idea


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sharky with 22 posts (7 thanks)
    2. looks_two systrader with 11 posts (31 thanks)
    3. looks_3 Peter with 6 posts (10 thanks)
    4. looks_4 zeller4 with 4 posts (1 thanks)
      Best Posters
    1. looks_one systrader with 2.8 thanks per post
    2. looks_two sam028 with 2 thanks per post
    3. looks_3 Peter with 1.7 thanks per post
    4. looks_4 sharky with 0.3 thanks per post
    1. trending_up 22,314 views
    2. thumb_up 58 thanks given
    3. group 11 followers
    1. forum 64 posts
    2. attach_file 14 attachments




 
Search this Thread

script idea

  #1 (permalink)
 
sharky's Avatar
 sharky 
MIAMI,FL
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, tradingview
Broker: Private
Trading: Crypto and natural gas
Posts: 1,063 since Jun 2009
Thanks Given: 625
Thanks Received: 3,906

hey if anyone out there wants to take a shot programming a script have at it here are my rules for a good one that i traded manually today and made a killing. open 730 chicago monday close friday 200pm,20 contracts market order,buy on lime reverse on maroon,7 zerolag-7 zerolag,ive enclose some pics...sharky

Attached Thumbnails
Click image for larger version

Name:	system_idea.png
Views:	631
Size:	84.4 KB
ID:	350   Click image for larger version

Name:	greg1.png
Views:	619
Size:	145.2 KB
ID:	351   Click image for larger version

Name:	setting_7_zerolag.png
Views:	519
Size:	70.5 KB
ID:	352  
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Tao te Trade: way of the WLD
24 thanks
Spoo-nalysis ES e-mini futures S&P 500
19 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
systrader
Rocky Mountains
 
Posts: 19 since Jun 2009
Thanks Given: 17
Thanks Received: 37

If there are no takers I don't mind giving it a go. If anyone already started plz PM me, otherwise I'll get this one coded for sharky.

Reply With Quote
Thanked by:
  #3 (permalink)
systrader
Rocky Mountains
 
Posts: 19 since Jun 2009
Thanks Given: 17
Thanks Received: 37


Below if the initial attempt to code this strategy. I've included the raw .cs file as well as a .zip file. The zip file includes all the required indicators. If you already have them then just copy the .cs file to your bin/strategy folder, open, and then compile.

Some notes:

1) SessionStart/End times should be set in the chart. However, I have also included similar properties in the strategy to override the chart. The strategy will not trade before/after the times set in the strategy properties. I did this as a precautionary measure (I can remove if not necessary).

2) The number of contracts to trade is set as a property of the strategy (def = 1)

I experimented with setting the CalculateOnBarClose = false but because of how the indicator works you could be in and out of a position many times during a bar. The strategy is now set to CalculateOnBarClose = true.

Quick observations: the actual entry comes 1 bar after the trend changes. The indicator actually paints the previous line/bar. Handling this on a tick by tick basis may be the way to go given some further logic (ex. trend changes and after x ticks in same direction take trade). I have a ton of other ideas but I think this is a good start.

Let me know what suggestions/ideas you may have and I'll get them coded. Also, PLEASE test this well before using on a live account to make sure everything is g2g.

I am leaving for a long weekend tomorrow but can resume development on this next week.

Posted in Downloads - [AUTOLINK]NinjaTrader[/AUTOLINK] Strategies - Big Mike's Day Trading Forum (ZTrade101)

Reply With Quote
  #4 (permalink)
 
sharky's Avatar
 sharky 
MIAMI,FL
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, tradingview
Broker: Private
Trading: Crypto and natural gas
Posts: 1,063 since Jun 2009
Thanks Given: 625
Thanks Received: 3,906

is this for 4 range or 11 range? or any range and do i just need the 7 zero lag is that what gives it the signal to go long or short? sharky

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
systrader
Rocky Mountains
 
Posts: 19 since Jun 2009
Thanks Given: 17
Thanks Received: 37

It will work on any chart (time frame) - just add the strategy to the chart you want to use (the 7/ZeroLag is hard-coded into the strategy so no need to set).

If you want to visualize the DMA indicator on the chart you will need to add it to the chart separtely.

Reply With Quote
Thanked by:
  #6 (permalink)
 
sharky's Avatar
 sharky 
MIAMI,FL
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, tradingview
Broker: Private
Trading: Crypto and natural gas
Posts: 1,063 since Jun 2009
Thanks Given: 625
Thanks Received: 3,906

now even if i set it on 20 contracts it still only buys 1 contract any ideas? i set it on set order quanity ----- by default quanitu
and i set it on----- by stratigie and both still let me only buy or sell 1 contract even if i have the very top set at 20??? thanks for all your help...sharky

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #7 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

Hi Sharky,

I think this works to go in , edit save and re-compile:

need to add the "_numOfContracts," at each EnterLong or EnterShort...
 
Code
EnterLong(_numOfContracts,_positionSig);
I'm trying it now, hope it works,

Kirk

Reply With Quote
Thanked by:
  #8 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 485 since Jun 2009
Thanks Given: 232
Thanks Received: 415

if NT considers it a paramterized object, it should be... then folks could adapt to their, instrument, trading style and test results

Zeller responded (in chat): 10:48am [COLOR=#0000ff]zeller4:[/COLOR]
Saroj, "SampleAtmStrategy" is built-in to NT

Reply With Quote
  #9 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

Quick modifications for Sharky, for more than 1 contract per entry, and an exit after x ticks.

Not tested !!!

Follow me on Twitter Reply With Quote
Thanked by:
  #10 (permalink)
systrader
Rocky Mountains
 
Posts: 19 since Jun 2009
Thanks Given: 17
Thanks Received: 37


Sorry about that Sharky (only tested w/ my usual 1 contract). I just made the same mod as zeller4 (didn't upload new version as it's exactly the same). Thanks for the update guys.

Reply With Quote
Thanked by:




Last Updated on November 15, 2009


© 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