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,949 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?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Daytrading to swingtrading
Traders Hideout
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
  #2 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Posts: 409 since Jan 2015
Thanks Given: 91
Thanks Received: 1,154

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,825 since Aug 2009
Thanks Given: 11,784
Thanks Received: 3,051


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