![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
is there a way (or could there be a way in a coming version) to make a strategy chart interactive (instead of only using parameter settings) to make a change without losing real time data plots?
for instance, I would imagine having an alert window pop up under a certain condition and then be able to input a value and have the cs use the value from that bar forward without replotting the whole chart...similar to an input button idea main issue here is being to change the chart without losing real time plots thanks
Last edited by ATI user; 08-22-2008 at 08:40 AM.
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Thanks for the suggestion!
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
come to think about it...you already have something like that don't you
you can right click in an Indicator chart running Charttrader and select between a sell stop, buy stop and buy stoplimit perhaps we could right click in a strategy chart and choose from Input A, Input B, Input C... at which time it asks for the input...which could be a value or string for instance, I would like to be able to turn off autotrading without losing all the plotted data from prior trades....so I would input 'off' to Input A which my cs would monitor to adjust the autotrading variable even better, my cs would monitor Input B where I could input the number of ticks back that I want my cs to trail my stop during a trade maybe we could decide when declaring a variable in the Properties section of the cs code if we want that variable to be browsable from the right-click input dialog as well as from the Parameter Settings dialog something like that would be very powerful by adding a lot of flexibility to my cs code
Last edited by ATI user; 08-23-2008 at 01:53 PM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Interesting. Thanks for sharing your thoughts.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
any chance that NT7 will have this capability?
if not, or even if it will, could you please point me in the right direction re how access an external file from my strategy to pickup values without disturbing the chart plots? thanks |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
ATI user,
There is no information about NT7 as of currently. We will make announcements when they become available. As to reading from external files, please see these reference samples: http://www.ninjatrader-support.com/v...ead.php?t=3476 http://www.ninjatrader-support.com/v...ead.php?t=3477 http://www.ninjatrader-support.com/v...ead.php?t=3475
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
thanks Josh
I will give those a try. |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
Josh
In SampleStreamReader is the indicator supposed to create the txt file per this code? // This sets the path in which the text file will be created. private string path = Cbi.Core.UserDataDir.ToString() + "MyTestFile.txt"; ...or am I...if me, where? I put a file in db/data and still got the error "File does not exist" Thanks. |
|
|
|
|
|
#9 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
ATI user,
That line does not create the file. That line is simply storing where the file is located at. The file location should be in My Documents\NinjaTrader 6.5\MyTestFile.txt and not in the db/data folder.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
Thanks Josh
It is reading the file fine and printing 0 0 0 0 How do I get data into the file? When I try to add data manaully it says it can not create the file...which is already created...does not make sense I should mention that my intention is to manually change data in the file so my cs will pick it up and make a change without losing its plots. Maybe I should have another indicator, streamwriter or other, that I can change a parameter setting in that would then write that to the file...which would then be read by streamreader???
Last edited by ATI user; 09-18-2008 at 11:39 AM.
|
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
Doh!
My cs picks up public variable values from several indicators all the time. Why not just have a dummy one that only holds the variables I want to change in my cs? Simple. Will advise |
|
|
|
|
|
#12 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
ATI user,
If you want to write to the file you will need to use StreamWriter. Reading from the file is done with StreamReader. Alternatively you can use the System.IO example one.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#13 | |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
Quote:
There is no way to get the above to work is there? Problem being the strategy feeds the variables to the indicator to then get back a result. I can not change an input parameter in the indicator in order to have it read by the strategy can I? Bummer |
|
|
|
|
|
|
#14 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
I am not exactly sure what you mean, but you can definitely expose variables in the indicator that can be read by the strategy. Please see this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=4991
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#15 | |
|
Senior Member
Join Date: Apr 2006
Location: Toronto
Posts: 1,321
Thanks: 1
Thanked 7 times in 7 posts
|
Quote:
Is this what users are doing to input variables to a strategy without the plots refreshing?...or is there any method? Thanks. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| API fees for Interactive Brokers | copodon | Connecting | 5 | 04-27-2011 11:42 AM |
| Chart data in Strategy Analyzer does not match real chart data | Greg1 | Strategy Analyzer | 12 | 04-20-2009 02:02 PM |
| To All Interactive Brokers Users... | trader65 | Charting | 0 | 05-12-2008 10:33 AM |
| Running a Strategy on German Stocks with Interactive Brokers | EvolveK | Automated Trading | 17 | 12-04-2007 05:53 AM |
| Interactive Broker | mic_ninja | Automated Trading | 1 | 11-30-2007 03:52 AM |