Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Martingale Bet Sizing

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

    #31
    Originally posted by RookieKiwi View Post


    Im really sorry for this i tried to make it work on my own but ill admit my skills arent very good when it comes to C# i wasnt able to figure out how to set it up correctly and where to call it, i made a simple Stochastics strategy for testing attached here, i tried to use getQty as the entershort/enterlong but wasnt able to figure out how to call the rest of your base to use it correctly, i think i was able to figure out the inheritance but the rest of it is like another language for me ​ could you take a look?, also to add more then 8 do i just add more double up cases and continue the same way that was already done?​

    For some reason the forum wont let me attach .cs files so just included a demo here
    You were close:
    1) Don't call GetQty() unless you want to know the quantity. What you did in the EnterLong/EnterShort is how you use it. Don't call any methods in OnStateChange. I removed GetQty() from both OnStateChange and that call you had in OnBarUpdate. Of course I left it where you had it in the calls to EnterLong/EnterShort.
    2) Call the base class in OnStateChange AND OnBarUpdate

    That was it, I think. I was impressed you figured out how to inherit MartingaleBase!! Points for that...

    Click image for larger version

Name:	Screenshot 2022-03-04 12.50.24.png
Views:	143
Size:	61.7 KB
ID:	1192464

    TestDemo.zip
    Last edited by traderpards; 03-04-2022, 01:51 PM.

    Comment


      #32
      Originally posted by traderpards View Post

      You were close:
      1) Don't call GetQty() unless you want to know the quantity. What you did in the EnterLong/EnterShort is how you use it. Don't call any methods in OnStateChange. I removed GetQty() from both OnStateChange and that call you had in OnBarUpdate. Of course I left it where you had it in the calls to EnterLong/EnterShort.
      2) Call the base class in OnStateChange AND OnBarUpdate

      That was it, I think. I was impressed you figured out how to inherit MartingaleBase!! Points for that...

      Click image for larger version

Name:	Screenshot 2022-03-04 12.50.24.png
Views:	143
Size:	61.7 KB
ID:	1192464

      TestDemo.zip
      OMG doesn't it suck when you were so close!, one other thing if i wanted to go past 8 exponential do i just duplicate the lines for Eight all the way upto the maximum value?

      Comment


        #33
        Originally posted by RookieKiwi View Post

        OMG doesn't it suck when you were so close!, one other thing if i wanted to go past 8 exponential do i just duplicate the lines for Eight all the way upto the maximum value?
        The next step after 8 is to do 16 and it's been too long for me to remember of the top of my head. If you want to do 16, you might need to seek therapy!

        Comment


          #34
          Hey buddy,

          Any change you can reupload the zip file? i can't dowload it anymore.

          Thanks in advance!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Working...
          X