Not logged in
Viewing 9 posts - 1 through 9 (of 9 total)

Forums>StrategyQuant>General Discussion>Symmetric Builder does not produce truly symmetrical algo's by default.

  • #245598|
    Customer
    48 Posts

    There is an issue which the SQX team argues is not a bug which causes long trades to be preferred over short trades when both long and short signals fire simultaneously. SQX team argues “Most markets have a long bias.” They also say we can build our own custom template if we don’t like it.

    I think it would be nice to have an option get symmetry from the builder when we have it set that way without having to create a custom template. If you agree (Currency traders?) please vote:

    https://roadmap.strategyquant.com/tasks/sq4_5170

    #245599
    Customer
    48 Posts

    Here are some signals which could sometimes be true for both longs and shorts (but only longs will fire by default):

    Price above low band / Price bellow high band
    Price above low ANYTHING / Price bellow high ANYTHING
    adxDI- / adxDI+
    bears power / bull power
    High rising for x bars / Low falling for x bars
    true / true
    Price bellow Moving average + x / Price above Moving average – x

    #245600
    Customer
    48 Posts

    About 5% of all strategies from random building are going to produce at least some simultaneous long and short signals. Way more than 5% if you include true/true strategies.

    #245602
    Customer
    48 Posts

    Consider a simple, longs and shorts always true strategy that produces a stop buy order at the highest high level and a stop sell order at the lowest low? This could be a beautiful symmetrical breakout strategy but it is being broken by the  “and Not LongEntrySignal ” applied only to short conditions (in this case this bug will prevent shorts from happening ever)!!!

    • This reply was modified 1 month, 1 week ago by  bendx77.
    #245605
    Customer
    386 Posts

    why not open both long and short :) with a positive payout you would be a winner in the long run.

    #245606
    Customer
    48 Posts

    why not open both long and short :) with a positive payout you would be a winner in the long run.

    yes long and short STOP orders above and bellow the highs and lows, that’s what I’m talking about but SQX will break the strategy by producing only longs and cancelling all the shorts by default.

    #245611
    Customer
    48 Posts

    Take for example this “symmetrical” strategy from builder which SHOULD produce a long stop entry order way above the daily close and a short stop entry order way bellow the daily close. But it is broken by SQX adding in this line “and Not LongEntrySignal)” and only places long orders….

     

     

    //——————————————————————–
    // Trading rule: Trading signals (On Bar Open)
    //——————————————————————–
    LongEntrySignal = True;

    ShortEntrySignal = True;

    LongExitSignal = false;

    ShortExitSignal = false;

     

    //——————————————————————–
    // Trading rule: Long entry (On Bar Open)
    //——————————————————————–
    if LongEntrySignal
    {
    // Action #1
    Open Long order at (CloseDaily(Main chart)[1] + (1.20 * BB Range(Main chart,41, 0.6)[1])) Stop;
    Order valid for 104 bars;
    Duplicate trades: disabled;
    Replacing pending orders: allowed;

    Stop Loss = 1.1* ATR(44);
    Profit target = 17.1* ATR(70);

    Exit After 82 bars;

    }

     

    //——————————————————————–
    // Trading rule: Short entry (On Bar Open)
    //——————————————————————–
    if (ShortEntrySignal
    and Not LongEntrySignal)
    {
    // Action #1
    Open Short order at (CloseDaily(Main chart)[1] – (1.2 * BB Range(Main chart,41, 0.6)[1])) Stop;
    Order valid for 104 bars;
    Duplicate trades: disabled;
    Replacing pending orders: allowed;

    Stop Loss = 1.1* ATR(44);
    Profit target = 17.1* ATR(70);

    Exit After 82 bars;

    }

     

    Attachments:
    You must be logged in to view attached files.
    #245612
    Customer
    48 Posts

    why not open both long and short :) with a positive payout you would be a winner in the long run.

    Or you were being sarcastic about hedging in a MARKET order scenario I guess. A strategy that opens a hedge to enter the market may seem silly but we still need to do something other than just discard the shorts because strategies that fire longs and short signals together do happen and just discarding the shorts is not fair to currency traders or traders that want true symmetry.

    In fact a strategy that opens a hedges to enter could actually be profitable, imagine a strategy that opens a hedge and the long side and short side have both (symmetrically) a tight SL and far away TP. If one side gets to TP the strategy produces a profitable trade… silly maybe but still possibly profitable…. and more importantly, still symmetrical!

    This bug effects also STOP and LIMIT order strategies too which may not necessarily wind up in a hedged position if they were allowed to fire and place orders in both directions simultaneously like my example above.

    • This reply was modified 1 month, 1 week ago by  bendx77.
    • This reply was modified 1 month, 1 week ago by  bendx77.
    #245621
    Customer
    386 Posts

    Not at all sarcastic. When doing these type of strategies i want to test everything no matter what it is. It is all about stats . I already have short strategies being very correlated with long strategies that are profitable. But it might be better doing long and shorts only which i did alot with SQ3 and many are good.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.