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 jmejedi with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,304 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?
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
17 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #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