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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      89 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      92 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      70 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      87 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      64 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X