Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Submit a screenshot of the chart

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

    #31
    Hello punkiy2111,

    From the description that may relate to where you have the code in your logic. If the screenshot is happening immediately you may need to add more conditions to prevent it until realtime as one possibility.

    I look forward to being of further assistance.

    Comment


      #32
      Thanks Jesse, could you please send me a link or condition that I could add to this indicator? where can i find out about this?

      In which section is the "Dispatcher generally placed? I have this code in
      protected override void OnBarUpdate ()

      and where the condition is met I have this set

      f (SendEmailForConditionB)
      {
      takeShot = true;
      }
      }

      else
      {
      ConditionBTrue = false;
      takeShot = false;


      Where, in
      Dispatcher.InvokeAsync (new Action (() => { if (chart! = null && takeShot == true)
      {
      Print("Screenshot saved to " + Core.Globals.UserDataDir);
      Share(toEmailAddress, "SELL, "Possible Sell " + Time[0].ToString() + " chart " + BarsPeriod.Value.ToString() + " " + BarsPeriodType.Minute);
      takeShot = false;
      }

      Everything really works for me except when I add the indicator and tell it to send it to me by email. From here he creates a screenshot for me and sends it to me by email, if I update with F5 he also makes a screenshot and sends it to me by email ...... What a horror !!! It is the only thing I need to finish the indicator. Any guidance from you will be welcome, thank you.




      Last edited by punkiy2111; 10-07-2021, 09:35 AM.

      Comment


        #33
        Hello punkiy2111,

        You would put that code in the location where your logic equates to true to send the email. If you have some condition that needs checked before sending the email it would go there in OnBarUpdate.

        If you wanted to add to your condition to check for realtime you can use the State object:

        Code:
        if(State == State.Realtime)
        I look forward to being of further assistance.

        Comment


          #34
          Jesseeee yesssss... Oh my God!!!

          I just wanted to ask you 2 more questions:

          1) The "Dispatcher" method is used for a screenshot when an event occurs with "Myscreenshot" in this case SELL, ... if I want to add another event, suppose that for BUY, the "Dispatcher" method is enough with the one already exists or should create another one changing the variables ... (the dispatcher would be with different variables and will also use Myscreenshot2)

          2) If I wanted to make a strategy based on this indicator, would it be easier if I used the existing code and also added buy and sell orders?

          Thank you very much for your enormous help.

          Comment


            #35
            Hello punkiy2111,

            1) You could use a variable similar to the sample I provided where you set it outside the dispatcher. Then inside the dispatcher based on the variable you could do different actions for buy or sell.

            2) You can use the existing code from a strategy as well if you wanted to make the indicator into a strategy. You would need to copy over the various parts of the code to the same locations in the strategy class. The alternative would be to add a plot to the indicator and have it make a value in the plot when a signal for a buy or sell should happen. The strategy could use that for buys or sells.

            I look forward to being of further assistance.

            Comment


              #36
              Thanks Jesse for answering, the variable you are referring to is the one that marks the time of the event and the chart?
              On the other hand, the screenshot should create another one for BUY called MyScreenshot2 or the one that Dispatcher already creates (MyScreenshot) serves.
              Thank you.

              Comment


                #37
                Hello punkiy2111,

                The variable I was referring to would be a new variable for whatever purpose you needed it for. Its the same concept as I had demonstrated previously, it would just be another variable created and used in generally the same way. You could use a bool or string to make a buy or sell type variable as an example.

                you can form any conditions you need before the dispatcher and the set the values you want set to variables. just the share code needs to be inside the dispatcher.



                I look forward to being of further assistance.

                Comment


                  #38
                  Jesse thank you very much for answering, I know what you mean. Well to that variable that you say I added an "else" and changed the name of the screenshot and it suits me perfectly, I suppose you meant that, right?
                  On the other hand, I would like that when I share by email the number of contracts negotiated in that time frame would appear, could you give me the code please?
                  Greetings.

                  Comment


                    #39
                    Hello punkiy2111,

                    Yes that is what I was referring to. You can use the dispatcher part mainly just for the share and everything else can go before that to set up variables the Share uses.That would be the dynamic way to populate what the share sends.

                    The number of contracts would be a little bit more difficult if you wanted to filter that for a period of time. Are you referring to a situation were you enter a start time and end time as a user input and then want the number of executions between those times? Or is this the time that the strategy has been enabled/session?

                    I look forward to being of further assistance.

                    Comment


                      #40
                      I mean when you email me
                      example:

                      if (SendEmailForConditionA)
                      {
                      SendMail (toEmailAddress, "LOW", "Low volume" + Time [0] .ToString () + "chart on" + BarsPeriod.Value.ToString () + "" + BarsPeriodType.Minute);
                      }

                      Thank you.

                      Comment


                        #41
                        Hello punkiy2111,

                        I understand that you want to send that information with the email. What period of time are you trying to collect the execution count from?

                        The number of contacts in total since the strategy started could be found using the strategies performance information. If you mean some other period of time then some extra logic would have to be used to count the executions in that period.

                        I look forward to being of further assistance.

                        Comment


                          #42
                          Jesse my indicator allows me to alert me when for example in 5 minutes a volume appears that I have previously configured in the indicator panel, for example it alerts me when 30k contracts are produced in a bar, then it sends me an email with the parameters that I put you before and also I would like you to tell me how many contracts have been produced in that bar and in that chart,

                          Is there no code like when it sends you the chart period BarsPeriodType.Minute?
                          thank you very much.

                          Comment


                            #43
                            Hello punkiy2111,

                            I am not certain I understand the wording you are using here. By contracts do you mean the current traded volume of the bar?

                            If so that would be Volume[0].

                            I look forward to being of further assistance.


                            Comment


                              #44
                              Yes, exactly

                              Comment


                                #45
                                Thank you Jesse, thank you so much for your help. You are a great professional. If I can think of something else, I'll ask you. Surely I have doubts. Thanks to your help I have greatly improved my favorite indicator.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                577 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                334 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                101 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                553 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                551 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X