Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

It should Enter but It doesn´t

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

    It should Enter but It doesn´t

    Hi!
    I am having a really Headache with a bad entry. Here is my code:

    Per1=20

    if (Position.MarketPosition == MarketPosition.Flat && ADX(14)[0]<25){

    if (High[0]>=APZ(2,per1).Upper[0]) EnterShortStop(APZ(2,per1).Upper[0],"Vende");
    if (Low[0]<=APZ(2,per1).Lower[0]) EnterLongStop(APZ(2,per1).Lower[0],"Compra");

    if (Position.MarketPosition != MarketPosition.Flat && BarsSinceEntry() == 4){
    ExitLong();
    ExitShort();
    }

    As you can see, Conditions fulfilled at the first red bar of the image, so an enterLongStop is sent to the next green bar. However, there is not such entry...

    If I write "EnterLongStop(APZ(2,per1).Lower[0] + TickSize,"Compra");" or "EnterLongLimit(APZ(2,per1).Lower[0],"Compra");", then, the strategy enters Long.

    Could somebody help my with this issue?
    Thanks in advance!
    Attached Files

    #2
    ppr4826, first I would suggest add a drawing object / print statement to your conditions so you can really be 100% sure an order should be placed from the way it's setup.

    Next work with TraceOrders in your script to see if you're running into any ignored orders here due to NT's internal order handling rules - http://www.ninjatrader.com/support/f...ead.php?t=3627

    To read more about the 'under the hood' order handling rules of the managed approach in NT, please see the last section of this link here - http://www.ninjatrader.com/support/h...d_approach.htm
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for your help Bertrand!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by arvidvanstaey, Today, 02:19 PM
      4 responses
      11 views
      0 likes
      Last Post arvidvanstaey  
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      60 views
      0 likes
      Last Post samish18  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      9 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      47 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X