NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

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

Reply
 
Thread Tools Display Modes
Old 07-04-2012, 04:07 PM   #1
pandyav
Member
 
Join Date: Oct 2011
Posts: 70
Thanks: 2
Thanked 1 time in 1 post
Default Strategy complies but does not work

Hello,
I just finished writing a strategy that complied perfectly well but when I try to plot it nothing happens. In short, for some reason it does not place any trade. My guess is that there is an issue with OnBarUpdate method, but I tried a couple of them but none of them are working. The strategy file is attache herewith.

Can someone help please?

Appreciate your help in advance.

Thanks
Attached Files
File Type: zip VsMTFTrendStrengthStrategy.zip (14.5 KB, 7 views)
pandyav is offline  
Reply With Quote
Old 07-04-2012, 05:58 PM   #2
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

Do you get any errors in the log when you try to run it?
Radical is offline  
Reply With Quote
Old 07-04-2012, 07:11 PM   #3
pandyav
Member
 
Join Date: Oct 2011
Posts: 70
Thanks: 2
Thanked 1 time in 1 post
Default Strategy complies but does not work

This is what I get in Log, seems like everything is fine but still can't see any trades placed on the chart.

Enabling NinjaScript strategy 'VsMTFTrendStrengthStrategy/8af52b6ed2cf494496ed5355b9505dce' : On starting a real-time strategy - StrategySync=WaitUntilFlat SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=False Set order quantity by=DefaultQuantity ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=False CancelExitOrdersOnDisable=True CalculateOnBarClose=True MaxRestarts=4 in 5 minutes
Thank you for your help.
pandyav is offline  
Reply With Quote
Old 07-04-2012, 08:30 PM   #4
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

If it's not very long, do you think you could post your OnBarUpdate code here instead of using the zip file?

Edit: by post I meant paste
Last edited by Radical; 07-04-2012 at 08:36 PM.
Radical is offline  
Reply With Quote
The following user says thank you to Radical for this post:
Old 07-05-2012, 03:23 AM   #5
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

I would suggest to try taking some of the entry filters out of your conditions until you see entries being 'hit', likely your rules are to hard to trigger on the dataset.

You also miss filtering your entry rules for BarsInProgress, this is only done for data series value set part...
NinjaTrader_Bertrand 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
Optimizer Doesn't Work on New Strategy DenMan Strategy Development 1 10-11-2011 07:11 AM
Strategy doesn't work alibanez Strategy Development 6 01-25-2011 04:02 PM
Why would Strategy work on a chart, but not in Strategy Analyzer? tazatek Strategy Development 6 06-02-2010 07:33 AM
Does Strategy work differently in Strategy Tab and in Chart? tjendra Strategy Development 1 04-22-2009 12:01 PM
Strategy doesn't work somehow Gordon_Gekko Strategy Development 4 11-06-2007 12:10 AM


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