Limitar tamaño lote martingala

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #129105 quote
    Carlos Garcia
    Participant
    Veteran

    Buenas tardes,

    Me gustaría saber cómo podría limitar el tamaño de una posición en una martingala. Por ejemplo si va subiendo 1 lote por cada operación perdida cuando llegase a 4 no suba más y se congelase ahí hasta nueva operación ganada o volviera al tamaño de lote incial = 1.

    Muchas gracias de antemano.

    Un saludo.

    #145498 quote
    robertogozzi
    Moderator
    Master

    Esto debería funcionar:

    Once IncreaseLots = 1
    Once MaxLots      = 4
    If StrategyProfit > StrategyProfit[1] or nLots = 1 Then
       IncreaseLots = 1
    Endif
    If nLots >= MaxLots Then
       IncreaseLots = 0
    Endif

    en tu código debes:

    • tiene una variable llamada nLots que contiene el número de lotes (puede cambiar su nombre, por supuesto)
    • agregue IncreaseLots a sus condiciones para aumentar lotes.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Limitar tamaño lote martingala


ProBuilder: Indicadores y Herramientas

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 04/30/2020
Status: Active
Attachments: No files
Logo Logo
Loading...