Announcement

Collapse
No announcement yet.

Strategy Commands in real-time?

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

  • Strategy Commands in real-time?

    Greetings..

    Can strategy. commands be used in real time or do the varialbes only get filled in when the back tester is run? Ie: can I use strategy.isintrade and default lot size while running my efs on a chart without the back tester tool. I'm creating some auto trading signals that will run during the day and was counting on a couple of the variables.

  • #2
    Geoff
    Even though the Strategy Object will run in real time it really should be used only for back testing.
    You should be able to easily substitute the methods of the Strategy Object with you own variables. For example you can create a variable called inTrade which will return true or false (or 1/0/-1 to indicate if long/flat/short).
    Alex

    Comment


    • #3
      Hmm I tried to get the defaultsize variable to print in realtime and it just showed 100. (even though my back tester config was set to 4 contracts). So then I assumed it would not work in real-time at that point. Ok I will make substitute variables for the real time usage. Just going to have it shove some signals to a paper trading account via text file output for now. If it works out I will post the code.

      Thanks for the help once again.

      Comment


      • #4
        Geoff
        I think that is because the getDefaultLoSize() method uses the Back Test setting only when actually running a back test else it defaults to 100.
        Alex

        Comment


        • #5
          Ahh that makes sense. Another quick question.

          I'm looking under the default broker functions and do not see a way to 'get' the current positon size for a symbol from the default broker (IB in this case). But there must be a way to poll this information. I have the little intergrated trading broker eSignal window up
          and it shows my current positon size in IB so i know it has access to the information.

          Is there a hidden function not listed in the EFS2 toolbox?

          Comment


          • #6
            Geoff
            As far as I know the Generic Broker does not currently have any built in method to retrieve that information from the broker. You may want to submit a suggestion by sending an email to [email protected]
            Alex

            Comment


            • #7
              Thx! Suggestion sent. in

              I dont find the generic broker functions too reliable.. as of yet. It started working for me today (auto trading my stuff to my paper acct) then after a few trades it wouldnt send any new ones to TWS. I exited esigna/tws and reloaded and it started working again. Im sure there is a reason. Its pretty touchy. Also the symbology database has some bugs (changes your route without you asking!) Its been a fun expierence to mess with but dont know if I'd use it with real cash as of yet. Maybe I'll check ou that Vision software.

              Comment

              Working...
              X