MicroTrendsLtd / NinjaTrader8

NinjaTrader8 Components Strategies and Trading tools
MIT License
73 stars 19 forks source link

Regarding the latest build. Did you intend to include Resource.resx and @SMA.cs ? #56

Closed jmscraig closed 2 years ago

jmscraig commented 2 years ago

Hi Tom,

Errors on the build for missing components.

Regarding the latest build. Did you intend to include Resource.resx and @SMA.cs ?

bin\Custom\Resource.resx bin\Custom\Indicators\binCustomIndicators.cs

Example source of error ` Ln377
[Display(ResourceType = typeof(Custom.Resource), Name = "SignalType1", Description = "0:off, 1:Double MA Crossover",

Missings

I could have slid the @SMA.cs in but was not completely sure on what you had included in Resource.resx

James

MicroTrendsTom commented 2 years ago

For now you have to copy the code base over the NinjaTrader Project Folder and use the NinjaTrader Custom Project

Yes that project could be fixed up by adding all the other dependencies but it will be easier to get the source and use the NT8 Custom Project image

I dont understand how mapping works in GitHub so i want to map GitHub project NinjaTrader 8 to the local documents NinjaTrader 8 folder that would be easiest way to work - otherwise its a sad case of copying the repos files and pasting over the NT8 folders....

MicroTrendsTom commented 2 years ago

dam so fiddly with github... in TFS i can chose mappings based on subfolders and so on. GitHub wants to map from main outwards. i think...

So what to do...? 1)Create a new repos and structure it so its easy to get and map to local NinjaTrader 8 folders 2) or is there some way to branch and do it that way..

E.G how to map repos from here: https://github.com/MicroTrendsLtd/NinjaTrader8/tree/main/ATSQuadroStrategyBase/NinjaTrader%208

to here \documents\NinjaTrader 8 NinjaTrader 8 image

guess i screwed up the structure at the start ooops

jmscraig commented 2 years ago

1) "use the NinjaTrader Custom Project" .. the challenge is that now you have to manage conflicts and merge your changes in with existing customizations in the NinjaTrader.Custom.csproj and the Resource.resx file.

2) In a Github repo the two simplest approach from an integration to local NT8 standpoint would be to: 2.1) limit all custom development work to what NT8's Import / Export of Zip files processes can handle 2.2) Create a NT8 import format zip file with the custom elements yo7u have developed 2.3) Add that Zip to your repo with the source.. just like we might add a pdb file.
2.3) Add a comment to the README.md that explains to use that zip file to import the project locally 2.4) Users import using the NT8 import process or manually copy the files in by hand.. which is what I normal as I like to review all source code before adding it to my local NT8 deployment.

3) Once I saw a post about best practices on how to manage your projects in subdirectories just under Custom (../bin/Custom) but recently looked and was not able to find that post.

4) Standalone NT8 Project Development: 4.1) As long as limit your local language needs to the default NT8 of English I actually did not find it too hard to map required references to stand alone projects. Pretty much all NT8 dependent resources to be mapped are found here: C:\Program Files (x86)\NinjaTrader 8\bin64 4.2) The best example I have seen of creating standalone compilable NT8 projects can be seen on Gitlab which is similar to GitHub. https://gitlab.com/jasonnatordaytrader/jdt.nt8 I am currently following Jason's lead in how configure Visual Studio 2022 to manage, develop and test NinjaTrader projects.

jmscraig commented 2 years ago

Working with the code as is..

The compile error implied that your recent work added required content to your local dev machine ../bin/Custom/Resource.resx file.

Would you mind adding that Resource.resx file to the repository or posting it here?

MicroTrendsTom commented 2 years ago

Note: For use just get the code and copy it to the NT8 folders and use the NT Custom project - copy over the top i spent many hours github cant do it. get the zip or clone and copy over is easiest. as shown here.

image

There is no point checking in all the NT8 open source to GitHub or using the project i had there - the code is best used inline in the NT8 default environment so you can use it within NT8 as you usually would do with this code in there etc

I made a note on the front page also about that etc

MicroTrendsTom commented 2 years ago

1) get the code from GitHub. Clone or Code Zip file 2) copy the code within NinjaTrader 8 to the local documents NinjaTrader 8 folders 3) Start NT8 - compile within the NT8 Code Editor 4) For Visual Studio open from the code editor or double click the NinjaTrader.Custom.csProj image

MicroTrendsTom commented 2 years ago

Please see #61 Also might fix this issue anyway will check it out ty - but for sure use the system as detailed in #61

MicroTrendsTom commented 2 years ago

The system is a framework which merges into the NT8 custom project it is not meant to be a standalone project all we would do is be duplicating and adding all the code in from NT8 this is the easiest way to work with with it: Just install it over the top of NT8 and then you can access all your 3rd party stuff and the NT8 source etc https://github.com/MicroTrendsLtd/NinjaTrader8/discussions/61#discussion-3889698

MicroTrendsTom commented 2 years ago

Note: The prior releases in the NT forums do use a NT Zip file approach for easy import
So this will be need to be made again and probably best to have that here somewhere with a link etc That will be easiest indeed for the new releases will make an issue for that... and close this down as the project you opened is redundant etc.

jmscraig commented 2 years ago

Hi Tom,

Thanks for the Step by Step notes. That is the same process I used to try load and play with the Hybrid Strategy yesterday. I people will find the notes helpful.

The only really tricky part during my first attempts at compiling was the dependency on Resource.resx and not knowing if you had customized it. You have not mentioned Resources.resx in the thread and Hybrid seems to work fine using my existing Resources.rexs so I conclude that there is no dependency unique to your local copy.

The one hitch I saw after just copying the files into my existing NT8 structure was during compile the NT8 embedded compiler was unable to resolve references for "Custom.Resource". I after looking at things I just deleted the characters " Custom. " and everything compiled fine.

Again, the UI panel is fantastic. James

MicroTrendsTom commented 2 years ago

hopefully the zip export and import will resolve issues thanks for the feedback,. glad you like hybrid trading approach :-)

jmscraig commented 2 years ago

Yes I personally don't need that and very rarely use the actual NT8 Zip import tool because I review all the code before I add it to my carefully managed collection.

I really brought it up to possibly use as a handy rubric, a model or pattern to follow to make it easier to know what people will find easy and uncomplicated to install into their existing environments.

Example: "If the NT8 import process would not be able to install the changes correctly then people are likely to find the copy over manual and integrate process complicated."

jmscraig commented 2 years ago

Yes I do like the panel.. I have worked on use of a large grid of smaller buttons in the upper left corner of the chart to do the same thing as your panel and I concluded that many buttons on the chart was never going to be a good approach.

Replacing the right panel in whole so cleanly is fantastic.

As to Hybrid. I have yet to see a single automated strategy that runs well for years without being touched and managed over time.

Even my strategies that run fully automatically by default I leave buttons up to adjust stops to better resistance points and I my human 'bias' from natural to bull or bear when I see market events outside the norms the algo was targeted to address.

So in small ways or large Hybrid is my default approach..

Looks like we are off on a fantastic journey here..

jmscraig commented 2 years ago

Today I will spend more time with the Hybrid Strategy loaded panel and thinking about how I might first be able to use them

MicroTrendsTom commented 2 years ago

NT Zip yes as detailed in the first releases and NT Forum etc we did use this method and now it fails so we can no longer use that method - please see the issue for that here #62

MicroTrendsTom commented 2 years ago

skies the limit.... you can see how we use it for the NYSE gap and session breakout mode in the trading group 9.15 EST live screenshare and voice commentary every day etc also videos https://algofuturestrader.com/algo-futures-trader-videos/

This particular issue is not related to that info and is closed, so we can discuss details in the open discussion or best trading room for education and techniques etc

for technical code UI discussions we could do that here i guess #52 Currently it its not plumbed in fully so there is more to come in the hybrid layers etc

MicroTrendsTom commented 2 years ago

once again thank you for your feedback and collaboration to make the update happen :-)