Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
The Breakpoint will not currently be hit source code is different...
Collapse
X
-
-
Hello bukowa,
Thank you for your post.
Unfortunately, VSCode is not supported (as it targets .NET Code and not .NET Framework).
We suggest using VS Community edition, and allowing source files to be different than compiled project.
To allow source files to be different than compiled project:- To modify a single breakpoint, hover over the breakpoint icon in the editor and select the settings (gear) icon. A peek window is added to the editor. At the top of the peek window, there's a hyperlink that indicates the location of the breakpoint. Select the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original.
- To modify this setting for all breakpoints, go to Debug > Options and Settings. On the Debugging/General page, clear the Require source files that exactly match the original version option. Make sure to reenable this option when you're finished debugging
Please let me know if you have any other questions.Gaby V.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Gaby View PostHello bukowa,
Thank you for your post.
Unfortunately, VSCode is not supported (as it targets .NET Code and not .NET Framework).
We suggest using VS Community edition, and allowing source files to be different than compiled project.
To allow source files to be different than compiled project:- To modify a single breakpoint, hover over the breakpoint icon in the editor and select the settings (gear) icon. A peek window is added to the editor. At the top of the peek window, there's a hyperlink that indicates the location of the breakpoint. Select the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original.
- To modify this setting for all breakpoints, go to Debug > Options and Settings. On the Debugging/General page, clear the Require source files that exactly match the original version option. Make sure to reenable this option when you're finished debugging
Please let me know if you have any other questions.
Thanks
Comment
-
I'm also getting this (Visual Studio) after updating to latest version 8.1.2. Never had any issues before upgrading from 8.0.28. Tried changing the setting but it's not working.
Edit: It does not work with Unirenko bars or any other non-minute based bars at all. When switching to minute bars I get a dialog saying the source file is different from when the module was built and then asking if I still want to use it. Then I get into debug mode in VS. However I need to debug using Unirenko bars...Last edited by Borgen; 11-13-2023, 04:47 AM.
Comment
-
Originally posted by Borgen View PostI'm also getting this (Visual Studio) after updating to latest version 8.1.2. Never had any issues before upgrading from 8.0.28. Tried changing the setting but it's not working.
Edit: It does not work with Unirenko bars or any other non-minute based bars at all. When switching to minute bars I get a dialog saying the source file is different from when the module was built and then asking if I still want to use it. Then I get into debug mode in VS. However I need to debug using Unirenko bars...
Comment
-
Yeah it's not that, I always have debug mode on by default since I work on code.
I'm using an added timeseries to a unirenko chart to project lines based on minute based charts. Whenever I use the indicator to a time based chart, it works, no matter the time.
Drop it on a renko, unirenko, ninzarenko, heikenashi or any other non minute based chart and the script doesn't seem to even run after State.Configure.
Comment
-
Hello Borgen,
To allow source files to be different than compiled project:- To modify a single breakpoint, hover over the breakpoint icon in the editor and select the settings (gear) icon. A peek window is added to the editor. At the top of the peek window, there's a hyperlink that indicates the location of the breakpoint. Select the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original.
- To modify this setting for all breakpoints, go to Debug > Options and Settings. On the Debugging/General page, clear the Require source files that exactly match the original version option. Make sure to reenable this option when you're finished debugging
Please let me know if I can assist further.
Gaby V.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Gaby View PostHello Borgen,
To allow source files to be different than compiled project:- To modify a single breakpoint, hover over the breakpoint icon in the editor and select the settings (gear) icon. A peek window is added to the editor. At the top of the peek window, there's a hyperlink that indicates the location of the breakpoint. Select the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original.
- To modify this setting for all breakpoints, go to Debug > Options and Settings. On the Debugging/General page, clear the Require source files that exactly match the original version option. Make sure to reenable this option when you're finished debugging
Please let me know if I can assist further.
If you had actually read my statement in post 5 you would have known that I DID try that setting and it did not work. I later added that it did work, but only on minute based charts and not time independent charts such as renko , unirenko etc.
Comment
-
Hello Borgen,
"I get a dialog saying the source file is different from when the module was built and then asking if I still want to use it."
The documented way to resolve this is to follow the instructions provided. This is from the Microsoft documentation, linked below:
https://learn.microsoft.com/en-us/tr...ion-built-into
Please let me know if you have any other questions.Gaby V.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Gaby View PostHello Borgen,
"I get a dialog saying the source file is different from when the module was built and then asking if I still want to use it."
The documented way to resolve this is to follow the instructions provided. This is from the Microsoft documentation, linked below:
https://learn.microsoft.com/en-us/tr...ion-built-into
Please let me know if you have any other questions.
Why bother answering if you.re not going to read the full posts. What is the problem I am describing? I write that debugging works with TIME based charts, but not time independent charts...
Just forget it. Ninjatrader is known to be buggy with any time independent bartype that isn't based on minutes. It's not like your developers have done anything to fix it during the past 2-3 years.
I'm not going to get any help resolving it from this forum to be hones so lets just drop it
Comment
-
You can try this simple example code on a minute (any will do) chart and see it work. Then do any type of non time based chart, renko, unirenko, ninzarenko, heiken ashi...it won't draw the line.
Code:public class TestRenko : Indicator { private double firstBar; private DateTime beginTime, endTime; protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @""; Name = "TestRenko"; Calculate = Calculate.OnBarClose; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = false; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; Lookback = 5; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; } else if (State == State.Configure) { AddDataSeries(Data.BarsPeriodType.Day, 1); } } protected override void OnBarUpdate() { if(CurrentBars[0] < Lookback || CurrentBars[1] < Lookback) return; if(BarsInProgress == 0) { if (Bars.IsFirstBarOfSession) { firstBar = Open[0]; } beginTime = Times[1][0]; endTime = Time[0]; Draw.Line(this, "Daily Open", false, beginTime, firstBar, endTime, firstBar, Brushes.Orange, DashStyleHelper.Dash, 5); } else if (BarsInProgress == 1) { } } [NinjaScriptProperty] [Range(1, int.MaxValue)] [Display(Name="Lookback", Order=1, GroupName= "Settings")] public int Lookback { get; set; } }
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,404 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
95 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
8 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
160 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
9 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment