Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
help with strategy
Updated April 27, 2010
Top Posters
looks_one
niki
with 3 posts (0 thanks)
looks_two
sam028
with 1 posts (1 thanks)
looks_3
Quick Summary
with 1 posts (0 thanks)
looks_4
zeller4
with 1 posts (0 thanks)
trending_up
1,727 views
thumb_up
1 thanks given
group
3 followers
forum
6 posts
attach_file
1 attachments
help with strategy
April 17th, 2010, 03:30 PM
wokolina
Experience: None
Platform: ninjatrader
Posts: 4 since Mar 2010
Thanks Given: 0
Thanks Received: 1
hi, I am not good with coding and what I looking for to figure out is how to develop a strategy where I can put SMA + some range
eg
Code
protected override void Initialize () { SetProfitTarget (& quot ;& quot ;, CalculationMode . Ticks , 4 ); SetStopLoss (& quot ;& quot ;, CalculationMode . Ticks , 2 ); CalculateOnBarClose = false ; } SMA ( close , 4 ) if ( price_is_above_SMA_5_ticks ) { enterlong ; //only one time, if price pullback (one tick because second is SL) and cross the fifth tick from SMA again, no more opening position } if ( price_is_bellow_SMA_5_ticks ) { entershort ; //only one time }
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
April 17th, 2010, 07:23 PM
Orlando Florida
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404
Hey Niki,
Not exactly sure how to interpret your request...
Two thoughts to help move it along:
1. Post a screenshot with markups to identify what you mean by this:
Quoting
//only one time, if price
pullback (one tick because second is SL) and cross the fifth tick from
SMA again, no more opening position
2. Check out the SampleMACrossover strats on the Ninjatrader forum website and see if that could be altered to accomplish what you want.
kz
April 17th, 2010, 09:09 PM
wokolina
Experience: None
Platform: ninjatrader
Posts: 4 since Mar 2010
Thanks Given: 0
Thanks Received: 1
it looks like that
April 19th, 2010, 02:44 PM
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629
I'm not sure to understand the question, but if you want to avoid reversing your positions after each opposite signal, the idea is maybe to do something like:
Code
if ( ( price_is_above_SMA_5_ticks ) && ( Position . MarketPosition == MarketPosition . Flat ) ) { enterlong ; } if ( ( price_is_below_SMA_5_ticks ) && ( Position . MarketPosition == MarketPosition . Flat ) ) { entershort ; }
Success requires no deodorant! (Sun Tzu)
April 26th, 2010, 11:28 AM
Galveston ,TX
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435
if you're asking for the "formula" to express price_is_above_SMA_5_ticks, try this:
Code
if (Close[0] > SMA(Close,4) + 5 * TickSize)
cheers,
-e
April 27th, 2010, 07:24 AM
wokolina
Experience: None
Platform: ninjatrader
Posts: 4 since Mar 2010
Thanks Given: 0
Thanks Received: 1
eman
if you're asking for the "formula" to express price_is_above_SMA_5_ticks, try this:
Code
if (Close[0] > SMA(Close,4) + 5 * TickSize)
cheers,
-e
yes, that what I'm looking for, I found it on ninja forum but anyway thx.
Last Updated on April 27, 2010