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 gm7_forum, Today, 05:51 PM
      0 responses
      2 views
      0 likes
      Last Post gm7_forum  
      Started by cre8able, Today, 03:20 PM
      1 response
      9 views
      0 likes
      Last Post cre8able  
      Started by fiddich, Today, 05:25 PM
      0 responses
      3 views
      0 likes
      Last Post fiddich
      by fiddich
       
      Started by gemify, 11-11-2022, 11:52 AM
      6 responses
      804 views
      2 likes
      Last Post ultls
      by ultls
       
      Started by ScottWalsh, Today, 04:52 PM
      0 responses
      4 views
      0 likes
      Last Post ScottWalsh  
      Working...
      X