Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Create a strategy analyzer for new strategy

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

    Create a strategy analyzer for new strategy

    Hi,

    I'm trying to use strategy Analyzer to create a new strategy as below:

    1. mesasure the high and low from 00:00 to 09:00 GMT (or can be changed accordingly). If the range exceed 80 ticks no trades at all for the day.

    2. place long and short orders 10 ticks outside this range, which are automatically triggered if the price reaches those levels. (only trade after 09:00 GMT and close it if neither of these is hit by 18:00 GMT and repeat the process the next day).

    3. if trade triggered, place a profit of 40 ticks and stop loss of 40 ticks.

    I've tried to use highest bar, lowest bar, time series to contruct the conditions but failed.

    Pls help!

    Regards,

    Toyogo

    #2
    Hi Toyogo,

    You would do something like this inside a time filter at 09:00
    Code:
    HighestBar(Close, Bars.BarsSinceSession - 1)
    That will give you the highest bar you are interested in for the current session. (For time filter reference sample go here: http://www.ninjatrader-support.com/v...ead.php?t=3226)

    After you have the number for the highest bar you can plug it into the High[] DataSeries to get the actual high of that bar.
    Code:
    High[HighestBar(Close, Bars.BarsSinceSession - 1)];
    Do the same to get the LowestBar. You will then end up with a comparison like this:
    Code:
    High[HighestBar(High, Bars.BarsSinceSession - 1)] - Low[LowestBar(Low, Bars.BarsSinceSession - 1)];
    Then its just a matter of adding the further logic you want to do with the 80 ticks stuff.

    For the trades take a look at either EnterLongLimit() or EnterLongStop(). See this tip for further information: http://www.ninjatrader-support.com/v...ead.php?t=3271

    Profit and stop loss orders can be placed through these methods: SetStopLoss() and SetProfitTarget()
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 11:51 AM
    0 responses
    16 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    20 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X