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
Martingale Strategy in Strategy Builder
Collapse
X
-
Hello abdelkrikib,
Thank you for your reply.
Looks like an error is being hit within the OnStateChange() method of the strategy. If the Strategy is still editable in the Strategy Builder, you can click the View Code and copy what you've currently got in OnStateChange() and then paste the text of that in your reply. If you've already unlocked it, you can copy and paste from the NinjaScript Editor, but I'd like to see if there's something obvious you've got in that method that would throw an error.
Thanks in advance; I look forward to assisting you further.
-
Originally posted by NinjaTrader_Kate View PostHello tradersgrail,
Thank you for your post.
From my understanding, a martingale strategy has to do with a strategy that has you double your position after a losing trade. This may be difficult in the strategy builder, but depending on the logic you use may be a possibility. It would almost certainly be easier to do by unlocking the code and actually programming the strategy directly using NinjaScript.
If you know the logic you would like and can write this as psuedo code in plain English, we can assist you in writing this as logic in C#. This thread will also remain open for any community members that know of an existing strategy with this functionality or who would like to create this as a convenience to you.
I'm providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
Strategy Builder 301
NinjaScript Editor 401
If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
A link to our Help Guide can be found below: https://ninjatrader.com/support/help...injascript.htm
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: https://ninjatrader.com/support/help..._resources.htm
You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
Click here to see our NinjaScript Reference Samples: https://ninjatrader.com/support/help...ce_samples.htm
Click here to see our NinjaScript Tips: https://ninjatrader.com/support/help...en-us/tips.htm
These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
There is also a growing library of user submitted custom indicators (100+) that can be downloaded from the NinjaTrader Ecosystem User App Share page: https://ninjatraderecosystem.com/user-app-share/ However, a cursory search did not find an existing Martingale strategy available.
Please let us know if we may be of further assistance to you.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
looks like i cannot attach the code to this message . please let me know how todo that .
thanks for your help and support
Leave a comment:
-
Hello tradersgrail,
Thank you for your post.
From my understanding, a martingale strategy has to do with a strategy that has you double your position after a losing trade. This may be difficult in the strategy builder, but depending on the logic you use may be a possibility. It would almost certainly be easier to do by unlocking the code and actually programming the strategy directly using NinjaScript.
If you know the logic you would like and can write this as psuedo code in plain English, we can assist you in writing this as logic in C#. This thread will also remain open for any community members that know of an existing strategy with this functionality or who would like to create this as a convenience to you.
I'm providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
Strategy Builder 301
NinjaScript Editor 401
If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
A link to our Help Guide can be found below: https://ninjatrader.com/support/help...injascript.htm
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: https://ninjatrader.com/support/help..._resources.htm
You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
Click here to see our NinjaScript Reference Samples: https://ninjatrader.com/support/help...ce_samples.htm
Click here to see our NinjaScript Tips: https://ninjatrader.com/support/help...en-us/tips.htm
These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
There is also a growing library of user submitted custom indicators (100+) that can be downloaded from the NinjaTrader Ecosystem User App Share page: https://ninjatraderecosystem.com/user-app-share/ However, a cursory search did not find an existing Martingale strategy available.
Please let us know if we may be of further assistance to you.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Leave a comment:
-
Martingale Strategy in Strategy Builder
Anyone have any idea how to create a martingale strategy in the strategy builder?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
22 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Leave a comment: