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 GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,227 views
      0 likes
      Last Post xiinteractive  
      Started by andrewtrades, Today, 04:57 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      7 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      440 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      12 views
      0 likes
      Last Post FAQtrader  
      Working...
      X