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

Wick entry & Exit

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

    Wick entry & Exit

    Team,

    I have a build a strategy to take entry based on wick and here is the code. I have similar for other direction. and it works fine.
    Click image for larger version

Name:	Capture.PNG
Views:	249
Size:	4.4 KB
ID:	1163547

    Click image for larger version

Name:	Capture.PNG
Views:	272
Size:	9.0 KB
ID:	1163546


    But also, I have situation where WICK formed for UPSIDE and immediate next candle DOWNSIDE and in this situation system should take entry on latest direction but its taking entries on both direction and resulting in failure. Please find below screengrab and help me on how to handle this situation.
    Click image for larger version

Name:	Capture.PNG
Views:	251
Size:	11.5 KB
ID:	1163548

    #2
    Hello surya,

    Thanks for your post.

    You could add a check to see if the previous bar was in the same direction.

    A up bar = Close > Open
    A down bar is Close < Open


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul, yours above recommendation worked very well. Here is another situation I'm facing can you guide us on how to handle it?
      Here you can see there are 2 candles with WICKS. Currently system is taking 2 trades rather I want to trade only on latest one
      Click image for larger version

Name:	Capture.PNG
Views:	233
Size:	7.2 KB
ID:	1163602

      Comment


        #4
        Hello surya,

        Thanks for your reply.

        I could not provide a solution for you as I assume the first entry meets your trade requirements and there is no way to know that the next candle will as well. You could prevent the 2nd entry by using Misc>Bars Since Exit, greater, Misc>Numerical value, X , as an entry criterion, where X is the number of bars you wish to wait before entering again. Note that when used as an entry criteria you will have to create this as a group so that you can check for the number of bars OR a -1 value. A -1 value means there has been no previous exit and without that, you will get no first entry.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        5 views
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        36 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X