Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Retesting previous Resistance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Retesting previous Resistance

    Hi all,

    I'm new to ninjascript and I discovered this amazing default indicator named "Swing". I would like to edit/tweak it a bit and have a few questions. Added illustrative image as well, hopefully, it will clarify what I mean.

    1. How can I detect if the price re-tests the previous swing high a.ka resistance?
    2. After re-test how I can enter a short trade.


    Thanks in advance!

    #2
    Hello ftraderXX,

    Below is a link to a forum post with helpful information about getting started with C# and NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040

    What are the specific rules you would like?

    You are wanting the Close[0] to be greater than the Swing.SwingHigh[0], and that this happens twice?

    Use a bool. When the Close[0] is greater than the SwingHigh[0] and the bool variable is false set the bool to true. When the Close[0] is greater than the SwingHigh[0] and the bool is true, trigger the action and set the bool back to false.

    Below is a link to an example.
    https://ninjatrader.com/support/foru...72#post1131172

    To submit an order to enter a short position, call EnterShort();.
    https://ninjatrader.com/support/help...entershort.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Chippy, Today, 02:00 PM
    0 responses
    3 views
    0 likes
    Last Post Chippy
    by Chippy
     
    Started by jimmy_NT, Today, 10:41 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JeffCO7, Today, 09:34 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by AdeptistJune, Today, 08:53 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by designer01, Today, 07:50 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X