Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Having trouble with my entry rule

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

    Having trouble with my entry rule

    I've put together the majority of my strategy but the one part i can't seem to get right is the entry rule.

    What I've been trying to do is create a rule that enters a long position if the open of 4 candles ago is less than or equal to the close of 1 candle ago plus a gap of 2%. The way this looks is: Open[4] <= (Close[1]) * (1 + 0.02) ... and the same reverse rule for shorting -- which is coded the same, just reversed (>=) of course.

    In addition to this, it can only enter the trade if the current candle is 9:35 AM. I have the time part coded right, but the entries are just out of whack. What I am trying to accomplish with this is to go long (or short) if at 9:35 the price is 2.5% higher (or lower) than the opening price at 9:30. Pretty straight forward, I thought.

    How would I code this? Some of the entries look correct from a directional standpoint, but they aren't always following the 2% rule, and some entries are completely wrong -- going LONG when the 9:35 price is clearly lower than the 9:30 price (and vice versa for shorts).

    If anyone could help me out and show me what conditions I need to select to create the proper entry rules for long and short that'd be much appreciated.

    Thanks!
    Last edited by cmspruill; 11-01-2012, 07:54 PM. Reason: tried to delete

    #2
    cmspruill, I see you posted this in 2 threads here on the forums, let's bundle it in the other where already discussion has been started...

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X