Code question

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6228 quote
    gforton
    Participant
    Average

    Hi,

    I am working on an automated strategy and I am running into a problem. I noticed that when I use an expression like:

    IF c1 AND c2 AND C3 THEN
    
     BUY 2 CONTRACTS AT MARKET
    
    END IF

     

    that these three conditions need not be simultaneously true. It may be that C1 is met in the first candle, but the two other conditions are met two candles later. Meanwhile, the trend may have changed.

    I am therefore looking for an expression that specifically demands that conditions 1, 2 and 3 have to be met simultaneously within the same candle.

    Can anyone tell me if there exists such an expression or how I can achieve this.

    Thank you very much and have a nice weekend,

     

    Glen

    #36616 quote
    GraHal
    Participant
    Master

    Hi Glen

    Did you get this sorted? IF c1 AND c2 AND C3 THEN always works for me and is such a basic essential that we could not code without it working? Or maybe I’m not analysing results close enough and it doesn’t always work?? 🙂 

    I went to your profile to see if you have done any more Bots recently.  I’m getting good results from your 1M scalper. I keep meaning to try and rework it to a short version also … did you try a short version of below please?

    https://www.prorealcode.com/topic/dax-intraday-scalping-strategy/

    Many Thanks
    GraHal

          

    #36655 quote
    Nicolas
    Keymaster
    Master

    Your problem is how you have actually coded your c1, c2 and c3 conditions. Without the code, it is difficult to give a short and good tips to solve your issue 😥

    GraHal thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Code question


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
gforton @gforton Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
8 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/29/2016
Status: Active
Attachments: No files
Logo Logo
Loading...