NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-01-2009, 07:06 PM   #1
eurostoxx trader
Member
 
Join Date: Apr 2009
Posts: 76
Thanks: 7
Thanked 1 time in 1 post
Default Limiting the Number of Trades

Hi I am fairly new to programming but I am finding the Ninjatrader interface fairly well equipped to do the basics of what I want.

I am having a problem with my strategy in that it fires off too many times in a given time period. I want it to only execute, say once every 30min (say for example a strategy that buys a MA crossover)

Can anyone suggest how I do this, or know of any previous posts that covered this topic

Thanks in advance.

May the stoxx be with you
eurostoxx trader is offline  
Reply With Quote
Old 09-02-2009, 07:22 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

eurostoxx trader,

You can do this by limiting the trading with a bool. After you enter once set the bool to false. When the bool is false do not allow for further trading. Reset the bool to true when 30 minutes have gone by and that will reenable you for trading.
NinjaTrader_Josh 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
Limiting trade number to one trader per day hanoakihiro Strategy Analyzer 1 04-28-2009 07:22 AM
limiting number of trades green Strategy Development 2 04-08-2009 09:46 AM
Limiting the number of Bars for Active Limit TAJTrades Strategy Analyzer 1 12-13-2007 07:19 AM
Number of Trades sknudsen Suggestions And Feedback 1 11-04-2007 11:54 PM
Number of Trades. sknudsen Indicator Development 1 06-14-2007 11:58 PM


All times are GMT -6. The time now is 10:34 PM.