Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change and Check SampleMACrossover strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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.

    Comment


      #3
      hello, is it possible to have the source code to optimize this strategy with the strategy generator?
      Thank's

      Comment


        #4
        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.

        Comment


          #5
          in fact I would like to make changes by adding other pararametres with the generator

          Comment


            #6
            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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            67 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            143 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            76 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            47 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            51 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X