Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help please with a basic startegy

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

    Help please with a basic startegy

    It seemed so simple when I started building this strategy but it looks like I am making some basic mistake.

    It is a strategy that:
    - Trades only ES with SMA(34) crossing above and below DEMA(500) for long and short entries.
    - The entry will be 2 ticks above the high of the signal bar
    - Stop loss is (high of the signal bar - DEMA(500) - 2 points). If this is more than 6 points, I'll pass the trade from risk mgt perspective
    - I'd like to trade 2 min charts and automate the strategy with 10 points of profit target or 6 points of risk as described above.

    The challenge is after compiling the strategy successfully I am not able to see any trades on the chart and I have been trying to crack this without any success.

    Can someone please help with why I am not able to see any entry or exit signals? What am I doing wrong here? very much appreciate your help. Thanks.
    Attached Files

    #2
    Your Risk1 DataSeries is hardly ever having valid values, as it is set only on of of 2 very specific conditions: the crossovers.

    That means that even when the code gets to the StopPrice setting section, Risk[1] almost certainly has an invalid value which most likely is never less than the 6 cutoff.

    You want to use Print() statements as you enter and exit each block, to show you the values that your variables hold. You might quickly see that those values are not what you would expect.
    Last edited by koganam; 10-16-2011, 12:37 PM. Reason: Corrected punctuation and grammar

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    635 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    365 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    106 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    571 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X