NexusFi: Find Your Edge


Home Menu

 





How use crossover method in NT7 to code when market crosses price level


Discussion in NinjaTrader

Updated
    1. trending_up 1,780 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 svasily 
Seattle WA USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Russell, ES, DX
Posts: 4 since Sep 2015
Thanks Given: 1
Thanks Received: 0

Hello,
I am going to backtest my strategy in Ninjatrader 7, so I am creating automated strategy using Ninjascript Strategy tool. I am not a C++ guru so I am using Edit Strategy Wizard rather then writing a code. I need a help to create strategy that allows for example to open Market buy order when price crosses over the defined price level. Can somebody help me with this issue. Any help will appreciative very much.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
400 Million Barrels to Address Middle East Supply Disruption
Commodities
Energy Futures Shatter All-Time Daily Volume: 8.3 Millio …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Posts: 409 since Jan 2015
Thanks Given: 91
Thanks Received: 1,152

You can do this just by using the default Sample MA Cross Over strategy that installs with NT. Just start with this and reverse engineer it to suit your needs: This is the basic meat of it.



if (CrossAbove(SMA(Fast), SMA(Slow), 1))
EnterLong();
else if (CrossBelow(SMA(Fast), SMA(Slow), 1))
EnterShort();
}

Just alter your trading values from this accordingly. If you have any specific questions let me know and I may be able to help you.

Happy Trading.

Ian


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,802 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


Try this.

NinjaTrader Version 7


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on X Reply With Quote
  #4 (permalink)
 svasily 
Seattle WA USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Russell, ES, DX
Posts: 4 since Sep 2015
Thanks Given: 1
Thanks Received: 0


DavidHP View Post

Thanks a lot for help.


Started this thread Reply With Quote




Last Updated on March 12, 2016


© 2026 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 - Downloads - Top
no new posts