Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

understanding how to implement trailing and parabolic stops into my strategy

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

    #31
    Okay then that is a negative. I must keep all my logic within the scope of that example.

    I think I know how I have to do this then. I'll get started and let u see the first part before I go further.

    Thank you, my good and patient tech guy.
    Last edited by trdninstyle; 10-26-2022, 12:33 PM.

    Comment


      #32
      Hello trdninstyle,

      If you are trying to use the code from that sample you need all of the existing sets. You can modify set 2 to match whatever entry condition you wanted but you still need all of the sets in that order and how the variables are used for the break even to work. You can adjust the default values for the user inputs to suit your needs.

      To know if your script is working correctly or not you can test it on your end, there is no reason to run it by us beforehand. If you have trouble with something you could then post what you changed. Testing is a large part of making scripts to ensure it both works and that you have fully understood the concepts used.

      Comment


        #33
        For now, I'm leaving the default values the same as the example and I'll come back if I need to add or change them.

        If I start out with -40, would I need to add another input for breakeven? Because it seems like it might stay -40 the whole time. I could be wrong.
        Attached Files

        Comment


          #34
          Hello trdninstyle,

          The sample already has inputs to specify the initial stop price and also the amount for the breakeven trigger, you wouldn't need to make any modifications to have it work for a breakeven.


          Comment


            #35
            Okay, good. Thank you for that straight answer.

            Comment


              #36
              In set 2, I'm getting ready to put in my strategy using a price bar low being above an EMA, which I like to have interchangeable.
              And opposite for below EMA bars high to sell.

              Don't I need to go back to inputs and place that there? So, I can later change the inputs for myself.
              I would hit the set button to go to default instead of writing in a number.

              2nd pic is how I did it yesterday but now excluding the scratched-out part. Should I put in my EMA in the input?
              Attached Files
              Last edited by trdninstyle; 10-26-2022, 02:02 PM.

              Comment


                #37
                Hello trdninstyle,

                If you need to add inputs for your own conditions you can do that. You can click Set to choose a input for an indicators value.

                Comment


                  #38
                  My own inputs just need to be before the example inputs, otherwise it won't work properly, right?

                  Comment


                    #39
                    Hello trdninstyle,

                    No they can be in any order in the inputs section. The Sets need to remain in the order that the sample shows for the variables to work right.

                    Comment


                      #40
                      ahh, okay. No harm no foul. I already started that over so to put the EMA first, then those other two. Now I kno tho.

                      Comment


                        #41
                        Now what I did in this case was place both setups all on set 2. Normally I would use two separate sets, set 1 & set 2, for Long and for Shorts.

                        Or do I still use a separate set for the short trade? The set 3. would be set 2 the other way.
                        Attached Files
                        Last edited by trdninstyle; 10-26-2022, 02:41 PM.

                        Comment


                          #42
                          Hello trdninstyle,

                          That sample is only made for 1 side, you would need to add new sets for short trades and also other sets for the break even movements.

                          I would suggest to make just a long side strategy and make sure you 100% understand what each set is doing before trying to add short side code. Once you feel 100% confident you know what each set is doing, create a new empty strategy and rebuild it for just the short side. Then test the short side strategy and make sure that does shorts how you expect. After that you could make a third strategy that combines both sides.

                          The sample requires all 5 sets to do the break even just for the long side which is going to need to be duplicated for the short side. You will have to make individual variables for the short side code that are independent from the existing long side code. Set 1 would still be used to reset variables but you would need to make 4 new sets for the short side which work independently.

                          That sample really isint intended to just be used as a strategy, its for learning purposes to explore what is required to do a break even movement. A strategy that does two sides may have many sets and variables and would be much more complex.

                          Comment


                            #43
                            Okay, good. I totally get it. I will make just a long side for now and test that. Then later make a short side and test that and ensure all is working as expected. Then make 3rd set combining both.

                            Do I place the example information directly underneath here? In pic. I think so.
                            Attached Files

                            Comment


                              #44
                              Hello trdninstyle,

                              If you are making a new empty strategy and trying to replicate the sample then yes you would put everything identically in the new script.

                              Comment


                                #45
                                So, in the pic, does this look right to you?
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Yesterday, 05:17 AM
                                0 responses
                                81 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                149 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                79 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                52 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                59 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X