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 zstheorist, Today, 07:52 PM
          0 responses
          3 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          149 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Working...
          X