Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Long and sell short

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

    Enter Long and sell short

    Team,

    I am building strategy through builder
    I am entering long on 9/28 TEMA crossing. See the attachment
    CrossAbove(TEMA(9), TEMA(28), 1)

    EnterLong(1, @"BreakevenLg")


    Now, I have
    SetProfitTarget(@"BreakevenLg", CalculationMode.Ticks, 100);

    For stoploss, I want to Stay in the Trade until CrossBelow(TEMA(9), TEMA(28), 1) happens. How can I achieve this?


    Click image for larger version

Name:	Capture.PNG
Views:	234
Size:	11.6 KB
ID:	1149043Click image for larger version

Name:	Capture.PNG
Views:	210
Size:	13.7 KB
ID:	1149044


    #2
    Hello surya,

    Will the strategy take a short position?

    If not, you can call Exit long position as the action in a different condition set when the crossbelow occurs.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3

      Enter SHORT on MNQ.... I have similar strategy for LONG on same Instrument MNQ


      Are these good settings? and Is it OK to have on same instrument?

      Click image for larger version

Name:	Capture.PNG
Views:	203
Size:	14.0 KB
ID:	1149148
      Click image for larger version

Name:	Capture.PNG
Views:	203
Size:	15.7 KB
ID:	1149143Click image for larger version

Name:	Capture.PNG
Views:	198
Size:	17.3 KB
ID:	1149147
      Attached Files

      Comment


        #4
        Hello surya,

        If you have not already, be sure to review the Strategy Builder 301 training video which discusses all of the tools in the Strategy Builder.

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

        Yes, calling ExitShort after a cross below would cause the short position to be exited.


        Running two strategies on the same instrument and same account would cause the strategies to become out of sync with the account.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, Yesterday, 11:51 AM
        0 responses
        19 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, Yesterday, 11:48 AM
        0 responses
        23 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-25-2026, 09:53 PM
        0 responses
        30 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 03-25-2026, 09:51 PM
        0 responses
        18 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 03-23-2026, 11:13 AM
        0 responses
        23 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X