Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy with renko..problem in backtest

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

    #31
    i read it...thanks...


    if (CrossAbove(Close,Open,1)) EnterLongStopLimit(Close[0]+1 * TickSize,Close[0]);
    else if (CrossBelow(Close,Open,1)) EnterShortStopLimit(Close[0]-1 * TickSize,Close[0]);


    ...

    Comment


      #32
      Originally posted by esignal View Post
      So are you now seeing the trades?

      Comment


        #33
        no....i don't see any trade ...

        Comment


          #34
          Originally posted by esignal View Post
          no....i don't see any trade ...
          Well, as I said, and have shown, that code works on my system. We have checked everything that I can check. If code that works on my system does not work on yours, and you say that there are no errors in your log, then someone will have to take a look at your particular system.

          You are going to have to send an email to NT support, requesting that someone took a look at your specific system remotely.

          Sorry that I cannot be of any further help.

          Comment


            #35
            now i see Ninjascript Output (usually i see Log)..

            In NinjaScript Output i see this error:



            Disabling NinjaScript strategy 'ntforumesignal/67481990'
            Strategy 'ntforumesignal/67481990': An order placed at '16/02/2016 00:03:00' has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been met.
            Enabling NinjaScript strategy 'ntforumesignal/67481990' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes


            i repeat:

            i use NQ 03-16 (setting originally)





            with this code :


            #region Using declarations
            using System;
            using System.Collections.Generic;
            using System.ComponentModel;
            using System.ComponentModel.DataAnnotations;
            using System.Linq;
            using System.Text;
            using System.Threading.Tasks;
            using System.Windows;
            using System.Windows.Input;
            using System.Windows.Media;
            using System.Xml.Serialization;
            using NinjaTrader.Cbi;
            using NinjaTrader.Gui;
            using NinjaTrader.Gui.Chart;
            using NinjaTrader.Gui.SuperDom;
            using NinjaTrader.Data;
            using NinjaTrader.NinjaScript;
            using NinjaTrader.Core.FloatingPoint;
            using NinjaTrader.NinjaScript.Indicators;
            using NinjaTrader.NinjaScript.DrawingTools;
            #endregion
            //This namespace holds Strategies in this folder and is required. Do not change it.
            namespace NinjaTrader.NinjaScript.Strategies
            {
            public class ntforumesignal : Strategy
            {
            protected override void OnStateChange()
            {
            if (State == State.SetDefaults)
            {
            Description = @"Enter the description for your new custom Strategy here.";
            Name = "ntforumesignal";
            Calculate = Calculate.OnBarClose;
            EntriesPerDirection = 1;
            EntryHandling = EntryHandling.AllEntries;
            IsExitOnSessionCloseStrategy = true;
            ExitOnSessionCloseSeconds = 30;
            IsFillLimitOnTouch = false;
            MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
            OrderFillResolution = OrderFillResolution.Standard;
            Slippage = 0;
            StartBehavior = StartBehavior.AdoptAccountPosition;
            TimeInForce = TimeInForce.Gtc;
            TraceOrders = false;
            RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
            StopTargetHandling = StopTargetHandling.PerEntryExecution;
            BarsRequiredToTrade = 20;
            }
            else if (State == State.Configure)
            {
            }
            }
            protected override void OnBarUpdate()
            {
            //Add your custom strategy logic here.
            if (CrossAbove(Close,Open,1)) EnterLongStopLimit(Close[0]+1 * TickSize,Close[0]);
            else if (CrossBelow(Close,Open,1)) EnterShortStopLimit(Close[0]-1 * TickSize,Close[0]);
            }
            }
            }
            Last edited by esignal; 02-21-2016, 03:44 AM.

            Comment


              #36
              Originally posted by esignal View Post
              now i see Ninjascript Output (usually i see Log)..

              In NinjaScript Output i see this error:
              i repeat:

              i use NQ 03-16 (setting originally)





              with this code :
              Something strange this way walks. I tried this again, and was also no longer seeing any trades, so started troubleshooting. It would appear that The EntryStopLimit() orders may be processing funny. Try switching your order levels to see if you get the same results that I did.

              ref: http://ninjatrader.com/support/forum...ad.php?t=83322

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by StockTrader88, 03-06-2021, 08:58 AM
              45 responses
              3,992 views
              3 likes
              Last Post johntraderuser2  
              Started by TAJTrades, Today, 09:46 AM
              0 responses
              7 views
              0 likes
              Last Post TAJTrades  
              Started by rhyminkevin, Yesterday, 04:58 PM
              5 responses
              62 views
              0 likes
              Last Post dp8282
              by dp8282
               
              Started by realblubb, Today, 09:28 AM
              0 responses
              8 views
              0 likes
              Last Post realblubb  
              Started by AaronKoRn, Yesterday, 09:49 PM
              1 response
              19 views
              0 likes
              Last Post Rikazkhan007  
              Working...
              X