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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    118 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    166 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    85 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    130 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    88 views
    0 likes
    Last Post PaulMohn  
    Working...
    X