PDA

View Full Version : how do i link my strategy to my chart


saeed
06-24-2009, 11:27 AM
hi

i need my strategy just to give me a signal not to execute orders and also set a stop limit on the trade .

NinjaTrader_Josh
06-24-2009, 11:30 AM
Don't call any order methods if you don't want it to trade. You can only place stops if your strategy trades.

http://www.ninjatrader-support.com/HelpGuideV6/RunningANinjaScriptStrategyFromAChart.html

saeed
06-24-2009, 11:41 AM
you mean on the window of strategy i shouldnt pu any values for order handling section? if not then what do you mean don't call any order method? how do i change that method to do not execute any orders just to show the signals.

thank you

NinjaTrader_Josh
06-24-2009, 11:45 AM
I mean your strategy code. If you don't want to trade, don't call any Enter() methods in your strategy code.

saeed
06-24-2009, 11:59 AM
i'm just using the simple moving average which comes with ninja trader strategies ,how do i access to the code of that strategy ,sorry just new to the ninja trader and first time want to see how the strategy works.

thank you

NinjaTrader_Josh
06-24-2009, 12:03 PM
Tools->Edit NinjaScript->SampleMACrossOver.

I am not sure what you are hoping to achieve. If your strategy doesn't trade, you will still need to tell it to do something or else it's going to be just like not having the strategy running.

saeed
06-24-2009, 12:11 PM
i need th estrategy just to give the signal so i can decide to buy or not can i set it up like that or not? also when i am in the trade by strategy wher do i enter my stop loss order because on the controll center gives me an error message ?

NinjaTrader_Josh
06-24-2009, 12:22 PM
saeed,

You need to change the code yourself. If you don't want it to trade, remove all the Enter() lines and replace them with something else. You can do things like drawing dots or painting the chart background.

Please find the help guide articles for DrawDot() or BackColor.

Not following you on your stop loss order issue. If you are doing a manual trade, then continue placing manual stop losses. The NinjaScript strategy will not do anything with manual trades. It effectively does not even know you did it.

saeed
06-24-2009, 12:34 PM
ok i am using strategy at this moment it took a trade for me now i am in the trade i see the trade is going against my profit i like to put stop loss on the trade but it wont recognise the stop loss ,it gives me an error message , i guess what i want to know is can i turn this execution mode into manual so if i want to enter i enter or if i want to get out of a trade because going against me and strategy is not taking me out of the trade ?

thanx

NinjaTrader_Bertrand
06-24-2009, 12:50 PM
saeed, which error message do you get? You could work a stoploss into the strategy and then drag and drop the level of the stop as needed on the SuperDOM for example.

saeed
06-24-2009, 01:18 PM
ok where do i create my stop loss so i can drag and drop it on my superdome?

NinjaTrader_Josh
06-24-2009, 01:27 PM
I am not sure what you mean by drag and drop a stop loss. If you are talking about the ATM strategies, please see the video library here on making ATM strategies to use with your SuperDOM: http://www.ninjatrader-support.com/HelpGuideV6/VideoLibrary.html

saeed
06-24-2009, 01:36 PM
ok i appreciate all your help it looks to me i am not explaining right to you guys what my problem is .

i make it simple i want to you the simple moving average strategy manualy , is that possible ? i want the strategy just to give me the signal to buy or sell not executing a trade.

thank you

NinjaTrader_Josh
06-24-2009, 01:46 PM
saeed,

Yes, it is possible, but you need to modify the strategy. You need to remove the Enter() lines so it doesn't trade and replace them with some visual notification so you know where the strategy would have traded.

Just use something like BackColor = Color.Green; or something like that.