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

order handling

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

    order handling

    Hello,

    to debug my scripts I switched back to the beginning starting with the wizard to generate a basic code for entry-handling without Iorders.

    But there is only 1 entry instead of 2 with the code from wizard:

    protected override void Initialize()
    {
    SetProfitTarget("L1", CalculationMode.Ticks, 5);
    SetStopLoss("L1", CalculationMode.Ticks, 4, false);
    SetProfitTarget("L2", CalculationMode.Ticks, 8);
    SetStopLoss("L2", CalculationMode.Ticks, 4, false);

    CalculateOnBarClose = true;
    }

    protected override void OnBarUpdate()
    {
    // Condition set 1
    if (RSI(5, 1)[0] < 25)
    {
    EnterLong(1, "L1");
    EnterLong(2, "L2");
    }
    }


    When I do it without the wizard I have also only 1 entry instead of 2, no matter if I have in Initialize
    EntriesPerDirection = 2; EntryHandling = EntryHandling.AllEntries;
    OR
    EntriesPerDirection = 1; EntryHandling = EntryHandling.UniqueEntries; //(which I dont want to have to avoid additonal entries)

    Whats wrong here please?

    Thank you!
    Tony
    Last edited by tonynt; 06-25-2018, 07:15 AM. Reason: Typing error

    #2
    Hello Tony,

    Thank you for your note.

    Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the log and trace files for the day in subject which you can find in My Documents>NinjaTrader7>Log and My Documents>NinjaTrader7/Trace folders.

    I look forward to your email.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello AlanP,

      thank you for your Reply. As I have to work with Iorders I switched back and there all is working fine.

      Thank you for your support!

      Tony

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by funk10101, Today, 12:02 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by GLFX005, Today, 03:23 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by nandhumca, Yesterday, 03:41 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Gaby  
      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  
      Working...
      X