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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X