Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Atm

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

    Atm

    Hi,
    Stategy Position calculates to either Long or Short.
    Actual position soon after follows by executing two contracts
    (close the fictitious one plus the one calculated on real time).

    How do you force the actual one to ignore the fictitious one?
    Tried with Currentbar>minimum number, but it is ignored.
    That is, start fresh with a new Connection,
    introduce a chart with just 1 bar but I see upon introducing the
    Strategy in the grid it assumes a position independent from the
    Currentbar>minimum number statement. A subsequent actual
    execution OnBarUpdate introduces 2 contracts instead of one.

    Athg with ATMStrategyCreate...

    Do you need to specify entries for
    GetAtmStrategyUniqueId(), "MyTemplate",
    and GetAtmStrategyUniqueId()


    Thanks,

    #2
    trend,

    Not sure I am following you exactly. From a NinjaScript strategy, it does not know the difference between a strategy position and an account position. It only knows its strategy position. When you run your script and you do not want it to make any historical trades which generates essentially virtual positions you can add this to your code:

    Code:
    if (Historical]
         return;
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh,

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      88 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      48 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      30 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      34 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      68 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X