PDA

View Full Version : Print() and INT() doesn't work.


Jenny
07-23-2007, 03:54 PM
Hi,

I have 2 questions here:
1. I try to print something, but nothing comes up

......
....
EnterLong(1,"");
SetProfitTarget("", CalculationMode.Ticks, 85);
SetTrailStop("", CalculationMode.Ticks, 97, false);
Print("NinjaTrader");

2. I would like to round a number down to the nearest integer, I use INT(), but it dosen't work.

Would you please tell me what is the right way?

Thank you

NinjaTrader_Ray
07-23-2007, 04:02 PM
Hi Jenny,

Please check your log tab, I suspect there may be an error related to the strategy that you will need to resolve.

Please take a look at the MSDN DOC for the Math class. There are methods there such as Math.Round() and Math.Floor and Math.Ceiling that will provide you with what you are looking for. The link is below.

http://msdn2.microsoft.com/en-us/library/system.math_members(VS.71).aspx

Jenny
07-23-2007, 05:00 PM
Do you mind to check the log tag under Control Center of Ninja? But there are nothing printed out. How to print on the chart?

Now I get a round number, but it is not a int, how to conver a double to int?

Thanks

NinjaTrader_Ray
07-24-2007, 03:32 AM
Hi Jenny,

Unfortunately we are only able to provide guidance in the area of basic programming questions since its outside of the scope of what we can provide technical support for. If you google something like "C# int to double conversion" you will find a lot of resources to help you in this area.

Here is an example.

http://www.csharphelp.com/archives2/archive336.html

Jenny
07-26-2007, 08:53 AM
Hi, Ray,

Where to find the Pint() information? I couldn't find from log tag under Control Center of Ninja. And How to prin() in chart?

Have nice day

NinjaTrader_Ray
07-26-2007, 08:55 AM
Hi Jenny,

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

Jenny
07-26-2007, 09:01 AM
Thanks for your answer.

I try to use:
Print("NinjaTrader");
But I couldn't find in the the Tag log. Where the NinjaTrader print to?

And do you have a live chat?

Thanks

NinjaTrader_Ray
07-26-2007, 09:07 AM
Hi Jenny,

Its sent to the output window. Tools > Output Window.

No we do not have a live chat.

Jenny
07-26-2007, 05:47 PM
You give me a great answer. Thanks a lot.