ATMs in a Strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


ATMs in a Strategy
Updated: Views / Replies:7,137 / 11
Created: by foxfox Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you dont need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

ATMs in a Strategy

  #1 (permalink)
Just starting out...
Italy
 
Futures Experience: Intermediate
Platform: ninjatrader
 
Posts: 13 since Jun 2009
Thanks: 0 given, 4 received

ATMs in a Strategy

Do you have a templete of a Ninja Script Strategy that include an ATM Strategy ?

Tanks

Reply With Quote
 
  #2 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

What do you mean by template ?

max-td
Reply With Quote
 
  #3 (permalink)
Just starting out...
Italy
 
Futures Experience: Intermediate
Platform: ninjatrader
 
Posts: 13 since Jun 2009
Thanks: 0 given, 4 received


An example.

Reply With Quote
 
  #4 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

basicly it works like this :


protected override void OnBarUpdate()
{
if (Historical)
return;

// Check for valid condition and create an ATM Strategy
if (Close[0] > SMA(20)[0])
AtmStrategyCreate(Action.Buy, OrderType.Market, 0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(), "MyTemplate",
GetAtmStrategyUniqueId());
}


and MyTemplate == the name of your created + saved ATM-strategy.
The strategy enters + starts this ATM for Targets+TS+Exit+Stops


you will find more infos here :
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?ASMStrategyCreate

max-td

Last edited by max-td; June 24th, 2009 at 05:37 AM.
Reply With Quote
 
  #5 (permalink)
Just starting out...
Italy
 
Futures Experience: Intermediate
Platform: ninjatrader
 
Posts: 13 since Jun 2009
Thanks: 0 given, 4 received

Ok,
If I want to assign a variable to MyTemplate in order to indicate the name in the strategy property when I started it haw can do ?

Tanks

Reply With Quote
 
  #6 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

hmm - dont know if we are talking about the same subject here ...
ATMs are the automated exit-styles - you can define them ie in the chart-trader : ATMStrategys.
You create them with your variables like Lot-size+Stops+targets .... + save them with specific a name
MyTemplate in this case is an example of a name of one ATM you have created yet and that includes all variables you have putted in.
it can also be named as EUROT3 or however.
if your strategy now enters a trade, it enters with this predefined ATM you have choosen in your strategy (ie EUROT3 or MyTemplate)
Then it is like it is - you dont need more variables - its all in the ATM.

Let me know if i dont understand you right.

max-td
Reply With Quote
The following user says Thank You to max-td for this post:
 
  #7 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

Should be a strategy in your NT samples titled:
"SampleAtmStrategy"

otherwise, you should be able to find it in the NT forums.

kz

Reply With Quote
 
  #8 (permalink)
Elite Member
Mumbai, India
 
Futures Experience: Intermediate
Platform: MT4, NT7,eSignal
Broker/Data: AMP/CQG
Favorite Futures: ZB,ZN,ES,currencies
 
indiantrader's Avatar
 
Posts: 105 since Jul 2010
Thanks: 314 given, 134 received

I am trying to include an ATM template in a strategy, however it does not open the orders as per the ATM strategy. Can anybody correct the code?

I have defined ATM Strategy Tempate as a string in a variable and included in properties.

privatestring aTMStrategyTemplate = @"";

and then this code to call an ATM strategy


if (Historical)
return;

// Check for valid condition and create an ATM Strategy
if (Position.MarketPosition == MarketPosition.Long)
AtmStrategyCreate(OrderAction.Buy, OrderType.Market,
0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(),
"ATMStrategyTemplate",
GetAtmStrategyUniqueId());

if (Position.MarketPosition == MarketPosition.Short)
AtmStrategyCreate(OrderAction.Sell, OrderType.Market,
0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(),
"ATMStrategyTemplate",
GetAtmStrategyUniqueId())



Here is a picture with d9 particle oscillator strategy.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



Last edited by indiantrader; August 30th, 2011 at 08:22 AM. Reason: add pic
Reply With Quote
 
  #9 (permalink)
Elite Member
Mumbai, India
 
Futures Experience: Intermediate
Platform: MT4, NT7,eSignal
Broker/Data: AMP/CQG
Favorite Futures: ZB,ZN,ES,currencies
 
indiantrader's Avatar
 
Posts: 105 since Jul 2010
Thanks: 314 given, 134 received

I searched through the ninjatrader support forum and found a template to include an ATM strategy in a ninjatrader strategy.

1.Select the code under variables, OnBarUpdate and properties sections into the main ninjatrader strategy.

2.Make 2 separate ATM strategies for buy and sell orders in superDOM with the names matching those in a strategy.

3.The orders opened by ther main strategies can now be managed manually by openeing a separate chart of the same instrument and linking that chart and superDOM. The chart trader is disabled on a chart running a strategy.

Here is the zip file for the sample ATM strategy.

Attached Files
Register to download File Type: zip SampleATMstrategyCANCEL.zip (2.6 KB, 176 views)
Reply With Quote
The following 3 users say Thank You to indiantrader for this post:
 
  #10 (permalink)
Elite Member
baltimore marylnd
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: es
 
Posts: 69 since May 2013
Thanks: 1 given, 6 received


hi, quick question to all

so i'm working with the ''sampleatmstrategy' sample that comes with NT.

i also created an atm strategy on chart trader.

now its time to test to see if it works. but during my test something strange is happening (by design i think).

my orders are being clearly submitted on the order tab in NT. but my orders are not displayed on the chart.

is there a way to get a similar view that chart trader gives you when using atm strategies with your custom trading strategy?

also my realized/unrealized gains for the strategy are not being shown on the strategy tab. nor is my equity changing.

Reply With Quote

Reply



futures io > > > > > ATMs in a Strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Call ATM Strategy on an automated strategy to control position jsengxx NinjaTrader Programming 7 May 31st, 2016 05:51 PM
Utility To Transpose Optimized Strategy Values From Excel Output to Actual Strategy mercuryfx NinjaTrader 5 April 7th, 2012 04:59 PM
Ninjatrader7 ATM Strategy combine with Strategy Wizard Ninja Script schuster21 NinjaTrader Programming 4 July 4th, 2011 05:39 PM
Wrong Commissions with 2 target ATMs BCNTrader NinjaTrader 7 May 6th, 2011 03:01 PM


All times are GMT -4. The time now is 10:51 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-11 in 0.14 seconds with 20 queries on phoenix via your IP 54.145.16.43