fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Pair trading suggestions

    Questions & Answers
    2
    2
    630
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      malfy last edited by malfy

      Hi There!
      @miro1360 i think i'm going to challenge your skills...

      My broker offers microlots tranding on CFDs like SP500 and Nasdaq. These 2 symbols both move by 0.01 as minimum step and have the same pip value.
      This conditions are perfect for a pair (or spread) trading experiment that can be very profitable (because normally most brokers don't allow microlots so you need big margins to match the pip values of 2 CFDs finding the correct trade volumes.. and there are no currencies being so strictly correlated).

      So the problem is... to create an EA that can trade this strategy, some measurements are needed and i think i have to create something like a "spread" indicator. At first glance I suppose it's impossible to track the relative movement of 2 symbols which have different prices, but it's possible to do it fixing a certain point in time. The idea is this: Nasdaq moves faster than SP500... so, if i recognize that Nasdaq spreads from SP500 more then the middle value of the last x candles, i open a Nasdaq position toward the mean revertions and the opposite position on the SP500.

      My intention is to create a lookback period, to use a cycle to check candles from this period to 1, check the single candles combinations of the 2 symbols (I mean... Symbol A Bull-Symbol B Bull, Symbol A Bear-Symbol B Bear, Symbol A Bull-Symbol B Bear and Symbol A Bear-Symbol B Bull) and then calculate the spread by simple addiction or subtctration of candles close price. (A tick by tick comparison would be better but i think is too complicated to do it).

      Once i have a single candle spread i can then add or subtract the value to the next candle spread, depending on the bear/bull combination and which symbol has generated the biggest candle, and then plot these values as positive or negatives horizontal segments or rectangles... like an histogram... Not an easy task but i think i can do it.

      The major problem is: once i have these values, how can i tell the EA to recognize a mean spread value for the traced period and to open a position when this value is reached? About this point i'm in a big trouble and i hope someone can suggest me a smart idea!

      Thanks!
      D.

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        Simplify this whole mess into more parts, like A,B,C,D,E and than try to combine them together, each one needs intensive testing with a lot of visual checks (like comments are). Each part should be defined in logic and math steps. To find these math+logic steps is the basic language to talk with fxdreema flawless 😄

        When you find these logic and math steps, than you can start ask, how to communicate with these two CFDs correctly. One is faster than other, so you have more possibilities, like:
        A) create 3 EAs, first one for collecting ticks from Nasdaq, second for SP500 and third EA working in onTimer section, the main communication between them can be with Terminal variables

        B) or you can create one EA for all symbols only in onTimer section, with faster period

        C) or one EA where blocks are in onTick section and this EA is placed in the faster symbol (Nasdaq)

        This is not about skills, but it is more about time. You have to invest a lot of time for something where the percentage of success is minimal. Well success, I also mean little success 😄

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        J
        K
        T
        S
        E
        F
        G

        26
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors