Forums Development Use R in trading

Viewing 9 posts - 26 through 34 (of 34 total)
  • Author
    Posts
  • #10363
    Anti
    Participant

      Hope tomorrow I’ve time to write next chapters (until “Graphical representation of FX/stock data”).

      #10364
      Anti
      Participant

        When accessing the table in the same way as the matrix and the dataframe, I expected an error message. But instead the same cell was accessed, obviously the table was implicitly pivoted.

        Could you pleas post the code as well as the error message here?! Do you mean indexing using x[m,n]?

        #10369
        simplex
        Moderator

          There was no error message! I just wanted to check some limits, expected an error message, and got a correct result.

          I converted matrix M into data frame MD and table MT. I expected the syntax x[i,j] to work on a matrix and a data frame, but not on the table, because this is organized in a database like manner and not a typical matrix or pivot layout.

          But it worked – see screenshot.

          Attachments:
          You must be logged in to view attached files.

          A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

          #10781
          smallcat
          Participant

            Thanks a lot @anti for your step by step tutorial .

            I have downloaded the R + Rstudio and installed it long time ago, but i was too busy with ideas of great traders @FF about the exit point (levels) and some other good stuffs (including Eurusdd, GG, and some other great ones), so have no enough time to play with this. I have downloaded the MT4 R bridge also from FF (7bit) & github (micclly) last week, will try it too in my free time (have so many plan to do, but have limited time :-)   , especially after i got eyes problem  :wacko:   ).
            I think getting the probability / statistics of our “weapon” is very very important. Some of indicators are repaint and it is not a good idea to get the statistic based on MT4 strategy tester. Statistic inside indicator itself (like kprsa did with his RS indicator) is nice, but i think, it would very nice if we can get it in other way. A friend use Python + Panda + R + Ninja for analysis.  May i know do you use Ninja or MT4 for your analysis ?  So far i know, Ninja using C# (with its powerful OOP and other features), MT4 using MQL (new one has OOP ability). I think Python is a simple programming language like PHP and MQL, but powerful, so learning Python will spend not so long time compare to C# or Java. I am not a good coder, have just very little experiences with C# long time ago just for plyaing around. From your experiences, is it better to learn C# and use Ninja+Python+Panda+R  , or for temporary it is enough to use MQL + R to calculate probabilities (then jump to Ninja + its friends in the future) ?
            Any idea is welcome … Thanks in advance.

            #10782
            Anti
            Participant

              Hi smallcat,

              nice to have you here. I use MT4 and usually import saved MT4 data into R. I think using the R bridge can simplify analysis precedure especially when you’re going to analyze big data sets (e.g. M1 data of many years). Python seems to be quite powerful and there are not that much differences between R and Python commands/syntax. I learned some Python basics during summer school but I came back to R due to my habits. Nevertheless, I assume you can do analyses in Python, too.

              During these days I have unfortunately not as much time as I wish to have. Thus, next chapters will be posted next year …

              Best, merry christmas and a happy new year

              Anti

              #10794
              simplex
              Moderator

                Thank you again @Anti for the efforts you’re expending to get us started in R:

                During these days I have unfortunately not as much time as I wish to have. Thus, next chapters will be posted next year …

                Take your time, will wait patiently! During the holiday season, most of us will have several activities outside the forum and outside MT4!

                Best,

                s.

                A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                #10795
                tankhang
                Participant

                  Hi @Anti

                   

                  I am idiot in ‘R’ ..  :-)

                  Don’t ‘accidentally’ deleted this thread until I finish all the material..

                  (learning a new language is hard for me..)

                  looking forward your next chapter..

                  thanks for your contribution..

                   

                  tankhang

                  #10796
                  smallcat
                  Participant

                    Hi smallcat, nice to have you here. I use MT4 and usually import saved MT4 data into R. I think using the R bridge can simplify analysis precedure especially when you’re going to analyze big data sets (e.g. M1 data of many years). Python seems to be quite powerful and there are not that much differences between R and Python commands/syntax. I learned some Python basics during summer school but I came back to R due to my habits. Nevertheless, I assume you can do analyses in Python, too. During these days I have unfortunately not as much time as I wish to have. Thus, next chapters will be posted next year … Best, merry christmas and a happy new year Anti

                    Have a wonderful merry Christmas and a happy and successful new year bro Anti ….
                    Do you mean, we can do statistical analysis just using MQL + R , without other programming language or tools (python or panda as example) ? This is nice … Have a nice holidays too …

                    Edit: you imported “saved MT4 data” into R, does this mean that R has a simple “database” ability ?

                    • This reply was modified 10 years, 4 months ago by smallcat.
                    #12001
                    simplex
                    Moderator

                      Just found this resource and thought it may be of interest for readers of this thread: title is Quantitative Trading with R

                      http://manual.zorro-project.com/Lecture4.htm

                      see also under:

                      http://www.rfortraders.com/

                      s.

                      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                    Viewing 9 posts - 26 through 34 (of 34 total)
                    • You must be logged in to reply to this topic.
                    Scroll to Top