NexusFi: Find Your Edge


Home Menu

 





Maximum of 1 ATM strategy at a time


Discussion in NinjaTrader

Updated
    1. trending_up 1,835 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 andreibara 
Montreal
 
Experience: Intermediate
Platform: Ninjatrader & Tradingview
Trading: ES, Stocks & Crypto
Posts: 4 since Oct 2020
Thanks Given: 0
Thanks Received: 0

I would like to limit the number of ATM orders to a maximum of 1 at a time (per chart and/or instrument). So if I have an active ATM in play, my system cannot trigger a second one. If there's a no code solution that would be great. If not, I would love to hear your take on it.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #2 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
Legendary Urban Samurai
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,345 since Jun 2010
Thanks Given: 357
Thanks Received: 1,059

I haven't done too much coding with strats... but if I understand, you only want a trade to be taken if you are currently flat?

If that is the case... you could do something like:
 
Code
if (Position.MarketPosition == MarketPosition.Flat){
  //Then take a trade
}
REFERENCE


Reply With Quote
Thanked by:




Last Updated on December 23, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts