help with strategy - futures io
futures io



help with strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one niki with 3 posts (0 thanks)
    2. looks_two zeller4 with 1 posts (0 thanks)
    3. looks_3 eman with 1 posts (0 thanks)
    4. looks_4 sam028 with 1 posts (1 thanks)
    1. trending_up 1,236 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

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

 
Search this Thread
 

help with strategy

(login for full post details)
  #1 (permalink)
 niki 
wokolina
 
Experience: None
Platform: ninjatrader
 
Posts: 4 since Mar 2010
Thanks: 0 given, 1 received

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 ("", CalculationMode.Ticks4); 
 
SetStopLoss ("", CalculationMode.Ticks2); 
 
CalculateOnBarClose false
 } 
    
SMA(close4)
 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  


Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
For the experts of Metastock
Platforms and Indicators
Is there inherently more opportunity in smaller markets?
Traders Hideout
TD Sequential for NT or MW?
Platforms and Indicators
1 min chart v-shape scan help please
ThinkOrSwim
Eurex Denali vs dxFeed
Sierra Chart
 
 
(login for full post details)
  #3 (permalink)
 zeller4 
Florida
 
Experience: Intermediate
Platform: NT7
Trading: CL, NQ, NG
 
Posts: 469 since Jun 2009
Thanks: 1,401 given, 402 received


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

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 niki 
wokolina
 
Experience: None
Platform: ninjatrader
 
Posts: 4 since Mar 2010
Thanks: 0 given, 1 received

it looks like that

Attached Thumbnails
Click image for larger version

Name:	long_short.jpg
Views:	81
Size:	36.3 KB
ID:	11417  
Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
 sam028 
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,680 since Jun 2009
Thanks: 3,793 given, 4,519 received

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)
Follow me on Twitter Reply With Quote
The following user says Thank You to sam028 for this post:
 
(login for full post details)
  #6 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
 
Posts: 386 since Mar 2010
Thanks: 364 given, 433 received

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

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 niki 
wokolina
 
Experience: None
Platform: ninjatrader
 
Posts: 4 since Mar 2010
Thanks: 0 given, 1 received


eman View Post
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.

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > help with strategy


Last Updated on April 27, 2010


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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