I want to round off the close position timing in SampleMACrossover strategy using DateTime object? how can achieve it ? and also verify it?
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
Change and Check SampleMACrossover strategy
Collapse
X
-
Change and Check SampleMACrossover strategy
Hello,
I want to round off the close position timing in SampleMACrossover strategy using DateTime object? how can achieve it ? and also verify it? -
Hello Kathir,
Thank you for your post.
Do you want to convert the SampleMACrossover script to calculate on each tick? Currently the strategy runs on the close of every bar, so the signal execution will not occur until the close of the bar, even though the crossing signal could have occurred at any point during the bar formation. The Calculate property will control weather your script's OnBarupdate method runs on bar close, on each tick, or on every price change. See the help guide page below for more details on the Calculate property:
If this is not the case, please clarify exactly what behavior you wish to achieve.
Thanks in advance; I look forward to resolving this for you.Kate W.NinjaTrader Customer Service
-
Hello 270027,
Thank you for your reply.
The source code for the Sample MA Crossover strategy is available in the NinjaScript Editor by default and it may be optimized using the Strategy Analyzer.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
-
Hello 270027,
Thank you for your reply.
The built in Sample MA Crossover is an unlocked script and cannot be edited in the Strategy Builder.
This Strategy Builder 301 video demonstrates recreating the same logic in the Strategy Builder, however:
Strategy Builder 301
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Yesterday, 05:51 PM
|
1 response
12 views
0 likes
|
Last Post Today, 06:20 AM | ||
Started by Human#102, 03-16-2024, 09:33 AM
|
2 responses
44 views
0 likes
|
Last Post
by Human#102
Today, 06:20 AM
|
||
Started by Binarytrader, Yesterday, 03:58 PM
|
1 response
7 views
0 likes
|
Last Post Today, 06:16 AM | ||
Started by OllAndBer, Yesterday, 03:05 PM
|
1 response
9 views
0 likes
|
Last Post Today, 06:05 AM | ||
Started by pickles1774, Today, 05:52 AM
|
0 responses
6 views
0 likes
|
Last Post
by pickles1774
Today, 05:52 AM
|
Comment