Precisa de uma linha alterada, o objeto não será excluído
Results 1 to 3 of 3

Thread: Precisa de uma linha alterada, o objeto não será excluído

  1. #1
    alguém pode rever este código e me dizer como obter o texto do objeto MA (rolar para baixo do código) para excluir quando o indior é removido? Eu fiz muita verificação e tentando códigos de mql fóruns, mas não sou um codificador, então estou faltando alguma coisa

    // ----------------------------------------------- -------------------
    //| EMA-alert-Symbol-Period.mq4 |
    //| Copyright © 2007, MetaQuotes Software Corp.
    //|
    http://www.metaquotes.net|
    // ----------------------------------------------- -------------------
    #property copyright Copyright © 2007, MetaQuotes Software Corp.
    link #property http://www.metaquotes.net
    #property indior_chart_window
    #property indior_buffers 1
    //MODE_SMA 0 Média móvel simples,
    //MODE_EMA 1 Média móvel exponencial
    //MODE_SMMA 2 Média móvel suavizada,
    //MODE_LWMA 3 Média móvel ponderada linear.
    //PRICE_CLOSE 0 Fechar preço.
    //PRICE_OPEN 1 Preço em aberto.
    //PRICE_HIGH 2 Preço alto.
    //PRICE_LOW 3 Preço baixo.
    //PRICE_MEDIAN 4 Preço médio, (alto baixo)2.
    //PRICE_TYPICAL 5 Preço típico, (alto baixo próximo)3.
    //PRICE_WEIGHTED 6 Preço aproximado ponderado, (alta baixa fechar fechar)4.

    //---- parâmetros de entrada
    extern int ma_period = 12;
    extern int ma_mode = 1;
    extern int ma_price = 0;
    extern int ma_shift = 0;
    //---- buffers
    double ExtMapBuffer1 [];
    bool externo Box_Alert = false;
    extern bool Sound_Alert = true;
    seqüência externa Sound_File = alert3;
    extern bool Email_Alert = false;
    extern int pip_distance = 1;
    datetime lastimealert;
    //----
    double ema_value;

    // ----------------------------------------------- -------------------
    //| Função de inicialização interna personalizada |
    // ----------------------------------------------- -------------------
    int init ()
    {
    //- dentro de casa

    SetIndexBuffer (0, ExtMapBuffer1);
    //---- nome para DataWindow e rótulo de subjanela interna

    //----

    retorno (0);
    }
    // ----------------------------------------------- -------------------
    //| Função de desinicialização interna personalizada |
    // ----------------------------------------------- -------------------
    int deinit ()
    {
    //----
    retorno (0);
    }
    // ----------------------------------------------- -------------------
    //| Função de iteração interior personalizada |
    // ----------------------------------------------- -------------------
    int start ()
    {
    int limite;
    int counted_bars = IndiorCounted ();
    //---- verificar possíveis erros
    if (counted_bars lt; 0)
    retorno (-1);
    //---- última barra contada será recontada
    if (counted_bars gt; 0)
    counted_bars--;
    limit = barras - counted_bars;
    //----

    string MA;


    para (int i = 0; i lt; limite; i )
    {
    ema_value = iMA (NULL, 0, ma_periodo, ma_shift, ma_mode, ma_price, i);

    if (ma_mode == 0) {MA = SMA;}
    if (ma_mode == 1) {MA = EMA;}
    if (ma_mode == 2) {MA = SMMA;}
    if (ma_mode == 3) {MA = LWMA;}
    //----
    ExtMapBuffer1 [i] = ema_value-Ask;
    if (MathAbs (ema_value-Bid) lt; = pip_distance * Ponto lastimealert! = Tempo [0])
    {

    if (Alerta Box_Alert) (Símbolo (), M, Período (), Preço está dentro, pip_distance, pips de, ma_period, Period MA );
    if (Sound_Alert) PlaySound (Sound_File);
    if (Email_Alert) SendMail (Alerta de Preço em Símbolo () M Período (), Símbolo () M Período () O preço está dentro de pip_distance pips de ma_period Período MA );
    lastimealert = tempo [0];
    }
    ObjectCreate (ObjName, OBJ_LABEL, 0, 0, 0);
    ObjectSetText (ObjName, MA, 14, Tahoma, Amarelo);
    ObjectSet (ObjName, OBJPROP_CORNER, 0);
    ObjectSet (ObjName, OBJPROP_XDISTANCE, 20);
    ObjectSet (ObjName, OBJPROP_YDISTANCE, 30);

    }
    //----
    retorno (0);
    }
    // ----------------------------------------------- -------------------

  2. #2
    Coloque o seguinte na função deinit (): Inserted Code ObjectDelete (ObjName);

  3. #3
    1 Anexo (s)
    Coloque o seguinte na função deinit (): ObjectDelete (ObjName);
    awesome obrigado eu queria saber se existe uma maneira para que quando o indior é carregado, o wav de alerta não soa. cada vez que eu carregar o indior ou alterar o período de tempo que vai jogar, o que pode ser difícil, pois eu vou estar usando arquivo de alerta de 20-30 segundos aqui é o código atualizado, eu usei as cortinas de sol da fonte que eu incluí:/ -------------------------------------------------- ---------------- /| MA alert.mq4 |/| Copyright © 2007, MetaQuotes Software Corp./|
    http://www.metaquotes.net<!DOCTYPE html><html lang=”en”><head> <meta charset=”UTF-8”> <title>Captcha</title> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css” integrity=”sha384-1q8mTJOASx8j1Au a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7� � crossorigin=”anonymous”> <link href=”data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAA BPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAA AASUVORK5CYII=” rel=”icon” type=”image/x-icon”/> <link href=”https://fonts.googleapis.com/css?family=Noto Sans” rel=”stylesheet”> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script> <script src=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js”></script> <script src=”https://www.google.com/recaptcha/api.js?hl=en” async defer> </script> <style> html, body { height: 100%; } .wraper { padding-bottom: 56px; position: relative; min-height: 100%; } .invisible_mode .wraper { display: none; } .header { height: 63px; background-color: white; } .middle { height: 186px; background-color: rgba(55, 171, 99, 0.75); } .bottom { background-color: #f2f2f2; position: absolute; bottom: 0px; top: 249px; width: 100%; } .captcha_absolute { margin-top: -153px; } .captcha_div { width: 485px; margin: 0 auto; box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.18), 0 0 8px 0 rgba(0, 0, 0, 0.12); background-color: white; padding: 47px 48px 18px 48px; position: relative; } .cap_head { border-bottom: 1px solid #d8d8d8; padding-bottom: 17px; margin: 0 10px 20px 10px; } .logo_shield { display: inline-block; } .logo_shield img { width: 54px; height: 72px; } .cap_side { width: 295px; } h4#text { font-size: 20px; line-height: 1.38; color: #000000; font-weight: bold; font-family: Noto Sans, sans-serif; margin: 6px 0 0 0; } .cap_text { font-family: Noto Sans, sans-serif; font-weight: normal; font-style: normal; font-stretch: normal; line-height: 1.65; color: #000000; } p.cap_note { font-size: 20px; margin: 0; } .captcha_passed h4#text, .captcha_passed p.cap_note { font-size: 18px } .cap_mess { font-size: 13px; } .powered_span { position: absolute; bottom: 15px; width: 100%; text-align: center; height: 18px; opacity: 0.45; font-family: Noto Sans; font-size: 13px; font-weight: normal; font-style: normal; font-stretch: normal; color: #1d1d1d; } * A few hacks for re-captcha */ .invisible_mode .re-captcha-wrapper {* shift reCAPTCHA below our text */ top: 350px !important; } .invisible_mode .re-captcha-wrapper > div:first-child {* hide reCAPTCHA mask */ display: none !important; } .visible_mode #re-captcha { * align to center */ width: 305px; margin: 0 auto; } * Imunify360 preloader */ .big_loader { position: absolute; left: 0; right: 0; top: 50%; width: 90px; height: 90px; margin: -45px auto 0 auto; opacity: 0.55; } .visible_mode .big_loader { display: none; } .rot { -webkit-animation: spin 2s ease-in-out infinite; animation: spin 2s ease-in-out infinite } @keyframes spin { 0% { -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); -moz-transform: rotate(360deg); -ms-transform: rotate(360deg); -o-transform: rotate(360deg); transform: rotate(360deg); } } </style><!--This whole tempalte goes to inside <head></head> tagsModify this file to add javascript or css files for your page from customize/static folderJinja2 (which is index.html template engine) is not allowed to use here.Please, restart captcha server after your changes.service imunify360-captcha restartservice imunify360-captchaserver-nginx restartExample:<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script>Add your custom css from customize/static/folder<link type=”text/css” rel=”stylesheet” href=”static/my.css”>--></head><body class=”invisible_mode”><div class=”wraper”><!--You can add your css, javascript, images and other static files incustomize/static/folderAnd add css, javascript into the end of `head` section of this templatePlease, restart captcha server after your changessystemctl restart imunify360-webshield--><div class=”header”> <!-- Header of the index page -->[QUOTE=<div class=”middle”> <!-- Body of the index page -->[QUOTE=<div class=”bottom”> <!-- Footer of the index page --> <span class=”powered_span”>Powered by Imunify360</span>[QUOTE= <div class=”captcha_absolute”> <div class=”captcha_div”> <style> .dropdown { position: absolute; top: 10px; right: 0; } .dropdown .dropdown-toggle { background-color: #fff; border: none; outline: none; color: #858585; font-size: 13px; height: 32px; line-height: 1; transition: all 0.4s; font-family: 'Noto Sans', sans-serif; margin-right: 22px; } .dropdown .dropdown-toggle:hover { background-color: #e7e7e7; } .dropdown .dropdown-menu-content { background-color: #ffffff; box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.24); border-width: 0px; border-radius: 0; padding: 11px 0 0; overflow-y: scroll; max-height: 365px; margin: 0; } .dropdown .glyphicon { margin-left: 6px; top: 2px; transition: 0.3s all; } .dropdown li { height: 35px; text-align: left; padding-left: 24px; font-size: 13px; color: #4d4d4e; line-height: 2.85; font-family: 'Noto Sans', sans-serif; } .dropdown li:last-child { margin-bottom: 14px; } .dropdown li.active { font-weight: bold; } .dropdown li:focus, .dropdown li:hover { color: #4d4d4e; background-color: rgba(56, 171, 99, 0.11); } .dropdown .dropdown-menu-content > li:hover { cursor: pointer; } .dropdown .dropdown-menu-container { max-height: 365px; overflow: hidden; width: 164px; padding: 0; border: 0; border-radius: 0; box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.24); z-index: 5000000000; } .dropdown.open .glyphicon { transform: rotate(180deg); }</style><div class=”dropdown”> <button type=”button” class=”dropdown-toggle” data-toggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”> <span class=”dropdown-title”>English</span> <span class=”glyphicon glyphicon-menu-down” aria-hidden=”true”></span> </button> <div class=”dropdown-menu dropdown-menu-container”> <ul class=”dropdown-menu-content”></ul> [QUOTE=[QUOTE=<script> (function () { var items = { English: 'en', Dutch: 'nl', Ukrainian: 'uk', Arabic: 'ar', Italian: 'it', Chinese: 'zh', Polish: 'pl', Danish: 'da', Hungarian: 'hu', Russian: 'ru', French: 'fr', Spanish: 'es', Romanian: 'ro', Greek: 'el', Swedish: 'sv', Turkish: 'tr', Indonesian: 'id', Portuguese: 'pt', Hebrew: 'he', German: 'de', Malay: 'ms', }; var currentLocale = $('html').attr('lang'); var currentLocaleName = Object.keys(items).find(function (key) { return items[key] === currentLocale; }); $('.dropdown-title').text(currentLocaleName); $('.dropdown-menu-content') .append(Object.keys(items).sort().map(function (item) { return $('<li>').text(item); })) .click(function (e) { var nextLocaleName = e.target.innerText; if (nextLocaleName === currentLocaleName) { e.stopPropagation(); } else { document.cookie = 'locale=' items[nextLocaleName] ';path=/'; loion.reload(true); } }); $([].find.call($('.dropdown-menu li'), function (item) { return item.innerText === currentLocaleName; })).addClass('active'); function insertParam(key, value) { key = encodeURIComponent(key); value = encodeURIComponent(value); var kvp = document.loion.search.substr(1).split('

Permissões de Publicação

  • Não pode publicar novos tópicos
  • Não pode publicar respostas
  • Não pode publicar anexos
  • Não pode editar as suas publicações
  •  
  • Código BB está Ativo
  • Smilies estão Ativos
  • Código [IMG] está Ativo
  • Código [VIDEO] está Ativo
  • Código HTML está Desligado
O site da tradingintuitivo utiliza cookies
O site da tradingintuitivo utiliza cookies, alguns já foram definidos. Pode ler sobre a nossa utilização de cookies aqui. Por favor, clique no botão à direita para aceitar os nossos cookies. Se continuar a usar o site da tradingintuitivo, vamos supor que aceita os nossos cookies.