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 judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Yesterday, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Yesterday, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Yesterday, 03:01 PM
      2 responses
      22 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Yesterday, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X