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:	201
Size:	11.6 KB
ID:	1149043Click image for larger version

Name:	Capture.PNG
Views:	178
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:	173
Size:	14.0 KB
ID:	1149148
      Click image for larger version

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

Name:	Capture.PNG
Views:	167
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 traderqz, Today, 09:44 AM
        1 response
        1 view
        0 likes
        Last Post traderqz  
        Started by rocketman7, Today, 09:41 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by guillembm, Yesterday, 11:25 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by junkone, 04-21-2024, 07:17 AM
        10 responses
        149 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X