Announcement

Collapse
No announcement yet.

Again that RT stuff

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

  • Again that RT stuff

    I followed Mr Matheny advise about RT execution but have this problem (see attachment) of bleeding data.

    I suppose it is because of every tick confirm that execution till it move to another price. The IB and Sound instructions are executing only once though.

    I enclose the code:

    // Exit and Alert us
    if (nLastRawTime != getValue("rawtime", 0))
    {
    if (Do_IBAutomatedTrading )
    {
    trade.Buy(getSymbol(), Nbr_Contract, IBBroker.MARKET);
    }
    if (Do_Alert )
    {
    Alert.addToList(getSymbol(), AlertMessage, Color.black, Color.blue);
    }
    if (Do_Sounds )
    {
    Alert.playSound("c:\\Program Files\\ESIGNAL75\\Sounds\\ProfitTarget.wav");
    }
    BarCount += 1;
    nLastRawTime = getValue("rawtime", 0);
    // Reset the counters
    strat_Target = 0;
    strat_Stop = 0;
    strat_EntryPrice = 0;
    }

    Thank you again.

    Cheers

    Andrei

  • #2
    Here is the attachment
    Attached Files

    Comment


    • #3
      Hi Andrei,

      I have been reading your post with interest I'm new to esignal and Java programming since friday.

      What are you using for automated trading
      Dynaorder or just efs i

      .e. trade.Buy(getSymbol(),100,IBrBroker.MARKET)

      ?

      Regards
      Spam

      Comment


      • #4
        You need control variables...

        I use these control variables to control the actions of my systems..

        In Backtest mode (for EFS) we have access to the following....

        Strategy.isInTrade()
        Strategy.isLong()
        Strategy.isShort()

        When I develop my RT code, I convert these to variables to assist in the control of my system. ie...

        StrategyisInTrade
        StrategyisLong
        StrategyisShort

        Initially, I force them all to "false". Then, as my system executes trades (entry/exit), I change them as necessary to true/false.

        The problem with you system (as far as I can see) it that it lacks control of what it is attempting to do. You need to add some control variables to assist in controling the actions of your system.

        for example.....

        if (!StrategyisInTrade) {
        .. allow for entry triggers
        .. set control variables is entry trigger is triggered.
        }

        if ((StrategyisLong) || (StrategyisShort)) {
        .. allow for EXIT triggers
        .. set control variables is exit trigger is triggered.
        }

        This way, your system controls it's own actions and you can prevent certain actions from repeating over and over.

        Brad
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          Thank you again Brad!

          I am trying to use IB as an automated system with stop and target.
          It is a tough assignment as the IB functions are not well explained, it seems.
          Furthermore there is much more info on backtesting than IB RT.

          All in all, have a look at www.ment.com as it has everything needed for RT system trading for eSignal and Dynaorder.

          I am just too stupid to follow that easy route...

          Cheers.

          Andrei

          Comment


          • #6
            my web site...

            Andrei,

            My site does not contain all the EFS information I can provide users. It is really a delivery/marketing tool for people to see what services/products I offer. Like a big multi-page brochure.

            Thanks for the vote of confidence and the compliment.

            I, like many others here on this BB, have developed many unique EFS files for clients. Some RT system and some not RT systems. By doing so, I have run into many of the same problems that others are experiencing and have resolved them once or twice.

            It does not mean that I have "all the answers", but I will recite the developer's motto....

            while (!perfect) {
            debug();
            modify();
            test();
            }

            Remember this motto and follow it.

            Best regards,

            Brad
            Brad Matheny
            eSignal Solution Provider since 2000

            Comment

            Working...
            X