Go Back   NinjaTrader Support Forum > NinjaTrader 8 > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 12-05-2017, 11:25 PM   #1
ArmKnuckle
Member
 
Join Date: Sep 2015
Posts: 56
Thanks: 19
Thanked 6 times in 5 posts
Default Strategies are Orange

I have a strategy (or strategies) that are highlighted ORANGE after they have been enabled in the “Strategies tab”.

This is defined as:

Orange highlighted "Strategy" name indicates the strategy is waiting until it reaches a flat position to be in sync with the account position before fully starting.

I am not sure how this can be. Note the following:

1) I am trading a multi-timeframe strategy
2) My code is written such that stocks that I trade OPEN and CLOSE on the same day.
3) I am trading in a SIM101 account.
4) I reset the SIM101 everyday before I trade. This takes place before the market opens.
5) “Clear history” is checked during SIM101 reset.
6) Trading hours: US Equities RTH
7) Start behavior: Wait until flat
8) I am trading an instrument list of 100 stocks
9) Anywhere from 1-5 stocks will be ORANGE
10) I have yet to trade real money on this software. No real trade history exists.

Once the trading day begins, some strategies might switch to GREEN, but not all of them. The ones that remain ORANGE will become disabled and will not trade during that day.

I have read HELP GUIDES for:

- Strategies tab
- IncludeTradeHistoryInBacktest
- Working with Historical Trade Data
- Syncing Account Positions

While these are a nice collection of info, it doesn’t tell me how to solve my problem.

How do I allow for all of the stocks I want to trade to be a GREEN currently running strategy in the strategies tab at open of trading during US Equities RTH?
A) What settings do I need to enter in the strategy window?
B) What code do I need in my strategy?
Thanks in advance.
Last edited by ArmKnuckle; 12-05-2017 at 11:28 PM.
ArmKnuckle is offline  
Reply With Quote
Old 12-06-2017, 10:50 AM   #2
NinjaTrader_Josh
NinjaTrader Customer Service
 
Join Date: Jun 2017
Location: Denver, CO
Posts: 106
Thanks: 1
Thanked 26 times in 25 posts
Default

Hello,
Thanks for your post.

It sounds to me like you have everything set up properly. I suspect that positions may not be closing out the way we think they are.

Please right click on the chart, or the Strategies tab for any Orange strategy and then select Strategy Performance > Historical. Then check the executions and check if an entry was the last execution and thus that trade is still open.

Also, when do you enable the strategies? Is it possible that a trade is open for the day?

I look forward to your reply.
NinjaTrader_Josh is offline  
Reply With Quote
Old 12-07-2017, 04:11 AM   #3
ArmKnuckle
Member
 
Join Date: Sep 2015
Posts: 56
Thanks: 19
Thanked 6 times in 5 posts
Default

There are 6 ORANGE strategies present before the trading day of December 7, 2017.

I right clicked on an all of the ORANGE strategies and then selected Strategy Performance > Historical. All 6 of these stocks traded on December 6, 2017. (I have the "Executions" xlsx export from NT8.).

Per the Strategy Performance > Historical > Orders ($) pulldown: All of these stocks had a second order created during December 6, 2017 after another trade was already live. The second trade goes the same direction as the first trade (Long/Short). This is odd because all of my strategies are set as: Order Handling > Entries per direction > 1.

Why is there a second trade when another is already live? Why didn't it close? (State: Working) My code states that all trades close at 3:57 PM Eastern Time. (These phantom trades are not included in "Executions" xlsx export.)

As stated earlier, I reset the SIM101 account everyday. “Clear history” is checked during the SIM101 reset. I reset the SIM101 account when the market is closed. There should be no history or open trades after “Clear history” is chosen, correct?

I enable the Strategies after I reset the SIM101 account. I enable the Strategies when the market is closed. (US Equities RTH)
Last edited by ArmKnuckle; 12-07-2017 at 04:59 AM.
ArmKnuckle is offline  
Reply With Quote
Old 12-07-2017, 09:24 AM   #4
NinjaTrader_Josh
NinjaTrader Customer Service
 
Join Date: Jun 2017
Location: Denver, CO
Posts: 106
Thanks: 1
Thanked 26 times in 25 posts
Default

Hello,
Thanks for checking on that.

Clear history is not the same as a historical trade a strategy may show when enabled.

That being said, I would like to take a look at the strategy(ies) in question. Please include a note along with each strategy of what behavior you would expect vs what is happening.

You can export your strategy by going to Tools > Export > NinjaScript Add On > Add > select your strategy > OK > Export > name the file 'NTsupport' > Save.
The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to an email to PlatformSupport(at)NinjaTrader(dot)com

Please reference this forum post in your email.
NinjaTrader_Josh is offline  
Reply With Quote
Old 12-11-2017, 04:42 PM   #5
ArmKnuckle
Member
 
Join Date: Sep 2015
Posts: 56
Thanks: 19
Thanked 6 times in 5 posts
Default

Update on the 6 ORANGE strategies before the trading day of December 7, 2017.

At the trading day open of December 7, 2017 (US Equities RTH), no bars were being created on NinjaTrader. The data light was green. After I restarted the computer, NinjaTrader began building bars as normal.

I have experienced this before when there are numerous ORANGE strategies before the open of the trading day.

Different strategies enabled to trade before the same trading day with the same list of stocks do not create ORANGE strategies. Are the previous historical trades of the strategy connected to the ORANGE strategies on the following day?
Last edited by ArmKnuckle; 12-11-2017 at 04:45 PM.
ArmKnuckle is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TD orange status TexFly Platform Technical Support 7 09-10-2013 10:17 AM
Orange Connection bau250 Platform Technical Support 1 07-16-2013 07:56 AM
Orange alert!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! RDPoS Platform Technical Support 9 10-28-2011 03:50 AM
Connected is orange Dobbes Platform Technical Support 5 04-02-2009 07:27 AM
Orange Juice bmaltz Platform Technical Support 1 07-30-2007 02:07 AM


All times are GMT -6. The time now is 02:53 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.