Cierre instantáneo de todos los pedidos... ¿es posible?
Cierre instantáneo de todos los pedidos... ¿es posible?

 

Publi

Página 1 de 352 12 ??ltimo??ltimo
Resultados 1 al 10 de 11

Tema: Cierre instantáneo de todos los pedidos... ¿es posible?

  1. #1
    Hola,

    Echo de menos una función en MT4, donde puedo cerrar rápidamente todas las operaciones abiertas al instante, en lugar de cerrarlas manualmente una por una.

    vi este hilo
    https://www.forosforex.com/bitcoin-t...dy-hotkey.html
    pero cuando intento utilizar este script aparece un error: error 4109.

    ¿Se puede hacer de otra forma o que hago mal?

    Tengo un EA y a veces me gustaría cerrar rápidamente todas las operaciones abiertas.

    Gracias de antemano,

    pipcruiser

  2.                         
    Publicidad
  3. #2
    la solución es simplemente ir a herramientas/opciones/permitir operar en vivo, el error desaparecerá de la mejor manera.

  4. #3
    Hola Tesla, me gustaría saber si existe alguna función o script para abrir todas las operaciones a la vez. Por ejemplo, ¿2 lotes de cable, 3 lotes de swissy, 1 lote de usd-jpy o cualquier otra combinación seleccionable y seleccionar largo o corto individualmente y ejecutarlos todos a la vez? En lugar de abrir uno por uno. Gracias de antemano. Lo estoy publicando aquí porque creo que es todo lo contrario a la solicitud original de este hilo.

    Cita Iniciado por ;
    Coloque esto en su directorio de expertos/scripts...
    Cita Iniciado por ;
    Coloque esto en su directorio de expertos/scripts...

  5. #4
    mil millones de gracias
    Que tengas un buen fin de semana PC.
    Cita Iniciado por ;
    Coloque esto en su directorio de expertos/scripts...
    Cita Iniciado por ;
    Coloque esto en su directorio de expertos/scripts...

  6. #5
    1 Archivos adjuntos Coloque esto en su directorio de expertos/scripts...
    https://www.forosforex.com/attachmen...1418838975.mq4

  7. #6
    Gracias amigo, no hay prisa... Que tengas un buen fin de semana, PC.
    Cita Iniciado por ;
    En Blackberry, le proporcionaré el archivo adjunto esta noche.
    Cita Iniciado por ;
    En Blackberry, le proporcionaré el archivo adjunto esta noche.

  8. #7
    En Blackberry, le proporcionaré el archivo adjunto esta noche.

  9. #8
    ¿Alguien puede aconsejarme cómo poner el texto del código en un script utilizable? Gracias PC
    Cita Iniciado por ;
    tesla muchas gracias
    Ehhh, pero ¿cómo lo adjunto en MT4? ¿Puedes publicarlo como archivo adjunto? Gracias de nuevo amigo PC
    Cita Iniciado por ;
    tesla muchas gracias
    Ehhh, pero ¿cómo lo adjunto en MT4? ¿Puedes publicarlo como archivo adjunto? Gracias de nuevo amigo PC

  10. #9
    I didn't check the link you posted, but here's a script I threw together in 30 seconds. PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”>intstart</span><span style=”color: #007700”>(){

    </span><span style=”color: #FF8000”>//whilethereareopenorders...
    </span><span style=”color: #007700”>while(</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()gt;</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>){
    </span><span style=”color: #FF8000”>//iteratetheorders
    </span><span style=”color: #007700”>for(</span><span style=”color: #0000BB”>inti</span><span style=”color: #007700”>=</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()-</span><span style=”color: #0000BB”>1</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>gt;=</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>--){
    </span><span style=”color: #FF8000”>//selecttheorder
    </span><span style=”color: #0000BB”>OrderSelect</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>SELECT_BY_POS</span><span style=”color: #007700”>);
    </span><span style=”color: #FF8000”>//closeorkilldependingonordertype
    </span><span style=”color: #007700”>Print(</span><span style=”color: #DD0000”>”Closingorder”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    switch(</span><span style=”color: #0000BB”>OrderType</span><span style=”color: #007700”>()){
    case</span><span style=”color: #0000BB”>OP_BUY</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Bid</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    case</span><span style=”color: #0000BB”>OP_SELL</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Ask</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    default:</span><span style=”color: #0000BB”>OrderDelete</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    }
    }
    }
    }
    </span><span style=”color: #0000BB”></span> </span> </code> You might wonder why the while loop is there since the for loop handles order iteration. It's incase an error is returned when an order close/kill is sent to the server. This script will move on to the next order to close it, but will doggedly re-loop until every single order in your account has been closed. Think of it as a poor-man's error handling. Note also that acceptable slippage has been set to a whopping 100 pips.

  11. #10
    tesla muchas gracias
    Ehhh, pero ¿cómo lo adjunto en MT4? ¿Puedes publicarlo como archivo adjunto? Gracias de nuevo amigo PC
    Cita Iniciado por ;
    I didn't check the link you posted, but here's a script I threw together in 30 seconds. PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”>intstart</span><span style=”color: #007700”>(){

    </span><span style=”color: #FF8000”>//whilethereareopenorders...
    </span><span style=”color: #007700”>while(</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()gt;</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>){
    </span><span style=”color: #FF8000”>//iteratetheorders
    </span><span style=”color: #007700”>for(</span><span style=”color: #0000BB”>inti</span><span style=”color: #007700”>=</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()-</span><span style=”color: #0000BB”>1</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>gt;=</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>--){
    </span><span style=”color: #FF8000”>//selecttheorder
    </span><span style=”color: #0000BB”>OrderSelect</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>SELECT_BY_POS</span><span style=”color: #007700”>);
    </span><span style=”color: #FF8000”>//closeorkilldependingonordertype
    </span><span style=”color: #007700”>Print(</span><span style=”color: #DD0000”>”Closingorder”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    switch(</span><span style=”color: #0000BB”>OrderType</span><span style=”color: #007700”>()){
    case</span><span style=”color: #0000BB”>OP_BUY</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Bid</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    case</span><span style=”color: #0000BB”>OP_SELL</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Ask</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    default:</span><span style=”color: #0000BB”>OrderDelete</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    }
    }
    }
    }
    </span><span style=”color: #0000BB”></span> </span> </code> You might wonder why the while loop is there since the for loop handles order iteration. It's incase an error is returned when an order close/kill is sent to the server. This script will move on to the next order to close it, but will doggedly re-loop until every single order in your account has been closed. Think of it as a poor-man's error handling. Note also that acceptable slippage has been set to a whopping 100 pips.
    Cita Iniciado por ;
    I didn't check the link you posted, but here's a script I threw together in 30 seconds. PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”>intstart</span><span style=”color: #007700”>(){

    </span><span style=”color: #FF8000”>//whilethereareopenorders...
    </span><span style=”color: #007700”>while(</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()gt;</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>){
    </span><span style=”color: #FF8000”>//iteratetheorders
    </span><span style=”color: #007700”>for(</span><span style=”color: #0000BB”>inti</span><span style=”color: #007700”>=</span><span style=”color: #0000BB”>OrdersTotal</span><span style=”color: #007700”>()-</span><span style=”color: #0000BB”>1</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>gt;=</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>;</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>--){
    </span><span style=”color: #FF8000”>//selecttheorder
    </span><span style=”color: #0000BB”>OrderSelect</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>i</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>SELECT_BY_POS</span><span style=”color: #007700”>);
    </span><span style=”color: #FF8000”>//closeorkilldependingonordertype
    </span><span style=”color: #007700”>Print(</span><span style=”color: #DD0000”>”Closingorder”</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    switch(</span><span style=”color: #0000BB”>OrderType</span><span style=”color: #007700”>()){
    case</span><span style=”color: #0000BB”>OP_BUY</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Bid</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    case</span><span style=”color: #0000BB”>OP_SELL</span><span style=”color: #007700”>:</span><span style=”color: #0000BB”>OrderClose</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderLots</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>Ask</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>100</span><span style=”color: #007700”>);break;
    default:</span><span style=”color: #0000BB”>OrderDelete</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>());
    }
    }
    }
    }
    </span><span style=”color: #0000BB”></span> </span> </code> You might wonder why the while loop is there since the for loop handles order iteration. It's incase an error is returned when an order close/kill is sent to the server. This script will move on to the next order to close it, but will doggedly re-loop until every single order in your account has been closed. Think of it as a poor-man's error handling. Note also that acceptable slippage has been set to a whopping 100 pips.

Permisos de publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •  
Uso de cookies
Utilizamos cookies propias y de terceros para elaborar información estadística y mostrarle publicidad personalizada a través del análisis de su navegación. Si continúa navegando acepta su uso. Más información y política de cookies.
     

Aviso legal: Ni forosforex.com ni ninguna persona involucrada en forosforex.com aceptarán ninguna responsabilidad por cualquier pérdida o daño en el trading como resultado de la confianza en la información contenida en este sitio web, incluidos datos, cotizaciones, gráficos y señales de compra/venta. Por favor, infórmese plenamente de los riesgos y costes asociados a las operaciones en los mercados financieros, una de las formas de inversión que más riesgos entrañan.
forosforex.com le quiere recordar que los datos contenidos en este sitio web no son necesariamente en tiempo real ni exactos. forosforex.com no asume responsabilidad alguna por las pérdidas en que usted podría incurrir como resultado de la utilización de estos datos. Este acuerdo se rige por su versión en inglés, que prevalecerá siempre que haya alguna discrepancia entre la versión en inglés y la versión en español. Los CFD son un producto difícil de entender, varios organismos reguladores consideran que no es adecuado para inversores minoristas debido a su complejidad y riesgo.
Advertencia de riesgo: Los CFDs son un producto difícil de entender, y puede no ser adecuado para inversores minoristas debido a su complejidad y riesgo. Existe la posibilidad de sufrir una pérdida igual o superior a la inversión. Por lo tanto, no debe invertir o arriesgar dinero que no pueda permitirse perder. Debe asegurarse de que comprende todos los riesgos. Antes de abrir una cuenta en un broker por favor sea consciente e infórmese de los riesgos asociados con el trading. El contenido de este sitio web no debe interpretarse como asesoramiento personal. ForosForex recomienda que busque el consejo de un asesor financiero independiente.