Announcement

Collapse
No announcement yet.

Code help

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

  • #16
    Chart of failed triggers

    Chart of one min Dax.
    Efs Triggering on some but not all.
    I haven't fully got the hang of file share so I hope the attachment comes out
    Attached Files

    Comment


    • #17
      There are two flags created in this code and both are global variables (initalized outside any functions). vOverSoldFlag = null and vOverBoughtFlag = null when initialized, and then inside main... (vValue is RSI... vSLOW is Stoch %D)

      if (vValue > 75 && vSLOW > 75) vOverBoughtFlag = true;
      if (vValue < 25 && vSLOW < 25) vOverSoldFlag = true;

      These flags are only set back to false once the MACD histogram crosses the zero line with this code.

      if (vOverSoldFlag == true && vHist > 0) {
      Alert.addToList(getSymbol(), "Go Long", Color.black, Color.green);
      Alert.playSound("swoosh.wav");
      vOverSoldFlag = false;
      }

      if (vOverBoughtFlag == true && vHist < 0) {
      Alert.addToList(getSymbol(), "Go Short", Color.white, Color.red);
      Alert.playSound("train.wav");
      vOverBoughtFlag = false;
      }

      For testing purposes I added some debug code to monitor the OB and OS flags, and they are nearly always false due to the RSI rarely being above or below their targets. I then tested this in replay mode and the OB/OS flags kept there true value even though the RSI dropped back below. Here is an .avi (500kb) that shows this. The MACD alert popped up shortly thereafter when the cross occurred and the flag was set to false. It seems that this is working correctly.

      Does this match with your criteria Russell? Which symbol and interval is being used to trigger 3 longs and 5 shorts? On the e-mini, I'm only seeing a rare pop-up alert here and there... maybe one per day.
      Regards,
      Jay F.
      Product Manager
      _____________________________________
      Have a suggestion to improve our products?
      Click Support --> Request a Feature in eSignal 11

      Comment


      • #18
        Attached is the latest version. Contains fixes for the following.

        - Looks like there was a bug in the "Go Short" text. Was showing white text and was hard to read. Has been changed to black.

        - Removed debug code and unused backtesting strategy stuff.

        - Changed the names of a few variables to make them more readable.

        Garth (or anyone else), if you have time feel free to take a look and have a go.
        Attached Files
        Regards,
        Jay F.
        Product Manager
        _____________________________________
        Have a suggestion to improve our products?
        Click Support --> Request a Feature in eSignal 11

        Comment


        • #19
          Debugging

          Jay

          Thanks for new code. I will monitor tomorrow as I am trading all day and see what it comes up with on a test chart. I think half the problem is I am trading on other charts whilst trying to do this - doesn't work.
          Any ideas on the lack of sound though - I get triggers but no sound and I have sound on my own efs's and the files you use are there and playback when asked - I know it will be something simple.
          R

          Comment


          • #20
            Russell,

            My sound is playing, when I run the 3rd edition, so I’m unsure. I suggest sending me your other EFS files and layout, so I can try to duplicate the problem from here.

            Looking at your screenshot, I see an RSI with two parameters (11 and 14), and it looks to have deeper valleys and higher peaks then what is programmed into the EFS we made. That could be the reason you see entries but the EFS doesn't. If you post that RSI EFS(and assuming I have time,) I can incorporate it.
            Regards,
            Jay F.
            Product Manager
            _____________________________________
            Have a suggestion to improve our products?
            Click Support --> Request a Feature in eSignal 11

            Comment


            • #21
              RE: Reply to post 'Code help'

              ;
              charset="iso-8859-1"
              Content-Transfer-Encoding: 7bit

              Attached efs
              I use them on daX

              R

              -----Original Message-----
              From: [email protected] [mailto:[email protected]]
              Sent: 13 March 2003 16:32
              To: [email protected]
              Subject: Reply to post 'Code help'


              Hello Russell,

              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              Comment


              • #22
                Russell
                You cannot include attachments when using an email client to reply.
                Alex
                Last edited by ACM; 03-13-2003, 10:48 AM.

                Comment


                • #23
                  Other efs files that I use

                  Hope this is ok
                  Attached Files

                  Comment


                  • #24
                    RSI efs

                    Rsi efs - I didn't realise you can only send one file at a time
                    Attached Files

                    Comment


                    • #25
                      Code Help Update 2

                      Ok - so here is the situation.
                      We have some code which works for Jay but not for me. why? -we don't know yet.
                      I had a test chart with the trigger panel up so that I could send it to Jay as I am sure its missing certain conditions. I still haven't gotten any sounds from it although all my other formulas spark up sounds just fine.
                      I can't prove it yet but something is just not right in the state of Denmark. And I like to have confidence in my efs.
                      Anyway to cut a long story short... on friday my machine went to the land of Gates in the sky - along with my special chart.
                      Monday we will try again with new machine.
                      I know we will get to the bottom of this - and there are not many services you can say that about confidently. Its just frustrating this learning process.
                      Hope this is not boring you all....

                      Comment


                      • #26
                        Finale

                        How bizarre!
                        To Jay - many thanks for your help - it all worked fine today. Even the sounds appeared - all it took was a reload of esignal on a new machine. No idea what was altered.

                        Russell

                        Comment


                        • #27
                          Great to hear you got it fixed! Please let me know if anything else comes up.
                          Regards,
                          Jay F.
                          Product Manager
                          _____________________________________
                          Have a suggestion to improve our products?
                          Click Support --> Request a Feature in eSignal 11

                          Comment


                          • #28
                            Compute on close

                            Jay
                            Set Compute on close
                            Should this be set in premain or main?

                            I Just want the efs to run on the close of the bar only

                            Russ

                            Comment


                            • #29
                              Russ
                              premain
                              Alex

                              Comment


                              • #30
                                Get price

                                Thanks Alexis
                                My trigger alert box gives symbol and time - how can I add the price that triggered it?
                                Russs

                                Comment

                                Working...
                                X