Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy name

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

    ATM Strategy name

    Hi there. I am having problems just copying and changing the name of the standard ATM strategy to a new name. The problem is the description and name will only accept "sampleatmstrategy' for it to compile. Not sure why. Any ideas? Thanks
    Attached Files

    #2
    Hello djkiwi,

    The name and description you are using is not correct because you are using a Resource that does not exist. You need to use a string for the name and description.

    Code:
    Name = "";
    Description = "";
    If you are making a copy in any other way than doing a Save As you are going to have to make changes like this. I would suggest to remove this file and then open the SampleATMStrategy -> Right click -> Save as, That will change the name and removed these resources.

    The resources would be in the stock files and are for regionalization.

    I look forward to being of further assistance.

    Comment


      #3
      Thank you Jesse. It worked!

      Comment


        #4
        Hi Jesse,

        I would like this to cancel the outstanding orders if they are not filled on the same bar. It just leaves the order sitting there and does not cancel it. Any idea how to modify this sample ATM strategy to achieve this? Thanks
        Attached Files
        Last edited by djkiwi; 12-22-2020, 09:29 PM.

        Comment


          #5
          Hello djkiwi,

          The ATM based strategies use different methods from the strategy based order entry, to close an ATM you can use AtmStrategyClose. There is a small sample involving PnL in the help guide, you would otherwise need to make some kind of condition which calls AtmStrategyClose. If you want to do that after 1 bar you would very likely want to use the CurrentBar index and store the value of CurrentBar when submitting the entry, you could then check if that stored value is 1 bar less than the CurrentBar to close the order.





          I look forward to being of further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          88 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          134 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          119 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          67 views
          0 likes
          Last Post PaulMohn  
          Working...
          X