NexusFi: Find Your Edge


Home Menu

 





ATM Template?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one dsraider with 6 posts (4 thanks)
    2. looks_two max-td with 4 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 nickdsc with 1 posts (0 thanks)
    1. trending_up 6,320 views
    2. thumb_up 5 thanks given
    3. group 2 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
Search this Thread

ATM Template?

  #11 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Got it!

else if (entryOrder != null && GetCurrentBid() >= Close[1] + 4 * TickSize)
{
CancelOrder(entryOrder);

GetCurrentBid() acts as Close in backtesting, but it does exactly what I want on the sim (intrabar). The only issue I'm now having is that since I'm writing a multi-timeframe strat, the CancelOrder() commands of BarsInProgress 1 & 2 are cancelling my main chart order. It technically shouldn't be able to do that, since I've split them up, but it still is. Any idea of how to prevent that? After that, I should be home free.

Thanks,
Dave

UPDATE: Figured it out. Used entryOrder1 and entryOrder2 for BarInProgress == 0 and BarsInProgress == 1, respectively, etc. Everything now works exactly as I wanted. Will test it out this week and if no problems occur, will post. Me go drink now.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
Quant vue
Trading Reviews and Vendors
MC PL editor upgrade
MultiCharts
 
  #12 (permalink)
 
jmejedi's Avatar
 jmejedi 
Lilburn, GA
 
Experience: Beginner
Platform: NinjaTrader
Broker: VelocityFutures/TT
Trading: ES
Posts: 62 since Jan 2011
Thanks Given: 13
Thanks Received: 4

I take it that this didn't work out for you ?



. . . . would be interested to see your results anyway , , ,


Thanks,

JME









dsraider View Post
Got it!

else if (entryOrder != null && GetCurrentBid() >= Close[1] + 4 * TickSize)
{
CancelOrder(entryOrder);

GetCurrentBid() acts as Close in backtesting, but it does exactly what I want on the sim (intrabar). The only issue I'm now having is that since I'm writing a multi-timeframe strat, the CancelOrder() commands of BarsInProgress 1 & 2 are cancelling my main chart order. It technically shouldn't be able to do that, since I've split them up, but it still is. Any idea of how to prevent that? After that, I should be home free.

Thanks,
Dave

UPDATE: Figured it out. Used entryOrder1 and entryOrder2 for BarInProgress == 0 and BarsInProgress == 1, respectively, etc. Everything now works exactly as I wanted. Will test it out this week and if no problems occur, will post. Me go drink now.


Reply With Quote
  #13 (permalink)
 nickdsc 
Toronto, Canada
 
Experience: Beginner
Platform: NinjaTrader, MultiCharts
Trading: Forex, oil, stocks, options
Posts: 15 since Mar 2012
Thanks Given: 23
Thanks Received: 3


Hello,

Does anyone know how to create an ATM template programmatically?

Not instantiate a strategy from a template like SampleAtmStrategy.
But create the template itself from code.

Basically reproduce from code the result of a user filling the various ATM template UIs.

The ultimate goal is to programmatically create an ATM strategy while providing (it) all the data a user can enter in the strategy template UI.

Thank in advance,
Nick

Reply With Quote




Last Updated on May 23, 2012


© 2024 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 - Privacy Policy - Downloads - Top
no new posts