Limitar tamaño lote martingala

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #129105 quote
    Carlos GarciaCarlos 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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 robertogozzirobertogozzi
6 years ago.

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