![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Oct 2011
Posts: 70
Thanks: 2
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
|
Do you get any errors in the log when you try to run it?
|
|
|
|
|
|
#3 |
|
Member
Join Date: Oct 2011
Posts: 70
Thanks: 2
Thanked 1 time in 1 post
|
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. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
|
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.
|
|
|
|
|
The following user says thank you to Radical for this post: |
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
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...
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |