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 mishhh, 05-25-2010, 08:54 AM
          19 responses
          6,189 views
          0 likes
          Last Post rene69851  
          Started by gwenael, Today, 09:29 AM
          0 responses
          3 views
          0 likes
          Last Post gwenael
          by gwenael
           
          Started by Karado58, 11-26-2012, 02:57 PM
          8 responses
          14,829 views
          0 likes
          Last Post Option Whisperer  
          Started by Option Whisperer, Today, 09:05 AM
          0 responses
          2 views
          0 likes
          Last Post Option Whisperer  
          Started by cre8able, Yesterday, 01:16 PM
          3 responses
          11 views
          0 likes
          Last Post cre8able  
          Working...
          X