Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

help with strategy wizard

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

    help with strategy wizard

    hi guys ive been trying to get a grasp on how to use the strategy wizard as I have some ideas I would like to test, i have watched many of the videos on how use the strategy wizard but im having no success backtesting anything (clearly im doing something wrong).

    I wanted to test something basic by just buying at the opening of the market if it is lower than the previous days close and exiting a few hours later or if a 1% profit can be made, this is what i came up with:
    set1
    Open[1]<Close[1]
    EnterShort(400,"")

    set 2
    GetCurrentAsk()>Open[0]
    ToTime(11, 0, 0) == ToTime(11, 0, 0)
    ExitShort(""."")

    Stop Loss and profit targets
    SetProfitTarget('', CalculationMode.Percent, 1)

    Any help is appreciated, if it is just completely wrong then a pointer to a video or guide that would make things more clear to me would be great
    Thankyou

    #2
    Hello Mrjinx25,

    If you would like to exit out of the trade at 1% profit then you would want to change SetProfitTarget to "SetProfitTarget('', CalculationMode.Percent, 0.01) to represent 1%. With the whole number 1 it will be viewed as 100% profit.

    Let us know if that helps.
    JCNinjaTrader Customer Service

    Comment


      #3
      I knew it was something simple tripping me up
      that helps a lot, thankyou for that

      Comment


        #4
        sorry one more question
        when I backtest my strategy it seems to be entering/exiting at the wrong times, I want it to enter if the open is less then the previous days close, but I cant figure exactly how I can set it to the previous days close specifically, at the moment I just have open [2] < close [2]
        thanks

        Comment


          #5
          Are you dealing with daily bars?

          Open[0] < Close[1] would get you the open of the current bar and the close of the previous. However the entry time would not be until the close of the current bar. Because of this when backtesting you may need to use a smaller time frame to get more accurate trades. (This would be beyond what the wizard can do and would require custom coding)

          You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by


          In real time this would work if you set calculate on bar close to false.

          A way to do this without a multi-series script would be to use minute bars instead of daily bars. You could then use the indicator PriorDayOHLC() to get the previous open/close

          LanceNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geddyisodin, Today, 05:20 AM
          3 responses
          20 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by lorem, Today, 09:18 AM
          1 response
          5 views
          0 likes
          Last Post lorem
          by lorem
           
          Started by bmartz, Today, 09:30 AM
          0 responses
          5 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by GussJ, 03-04-2020, 03:11 PM
          14 responses
          3,245 views
          0 likes
          Last Post GussJ
          by GussJ
           
          Started by ArkansasClint, Today, 09:28 AM
          0 responses
          2 views
          0 likes
          Last Post ArkansasClint  
          Working...
          X