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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    110 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    59 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    41 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    78 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X