Friday 19 May 2017

Lmt Forex Formula 2 1


Análise de Amostras de Hoje e Análise de Amostras em Tempo Real Após Horas Pre-Market News Resumo de Citações de Flash Citação Gráficos Interativos Configuração Padrão Por favor, note que uma vez que você fizer sua seleção, ela se aplicará a todas as futuras visitas ao NASDAQ. Se, a qualquer momento, estiver interessado em voltar às nossas configurações padrão, selecione Configuração padrão acima. Se você tiver dúvidas ou tiver problemas ao alterar suas configurações padrão, envie um e-mail para isfeedbacknasdaq. Confirme sua seleção: Você selecionou para alterar sua configuração padrão para a Pesquisa de orçamento. Esta será agora sua página de destino padrão, a menos que você altere sua configuração novamente ou exclua seus cookies. Tem certeza de que deseja alterar suas configurações? Temos um favor a perguntar Desabilite seu bloqueador de anúncios (ou atualize suas configurações para garantir que o javascript e os cookies estejam ativados), para que possamos continuar fornecê-lo com as notícias do mercado de primeira linha E os dados que você vem esperar de nós. A interface de comércio eletrônico de Interactive Brokers 1.3.8 Beta Leia-me 29 de maio de 2014 21:03 ESTA É UMA VERSÃO BETA DO SOFTWARE (veja a seção FAQ para uma resposta quotwhy é marcada como BETA quot) A NEGOCIAÇÃO AUTOMÁTICA TRATA DE CERTOS RISCOS. POR FAVOR TESTE CUIDADOSAMENTE O SEU CÓDIGO USANDO FIRST DEMO TWS E ENTÃO PAPER TRADING CONTA AUTOMATIC TRADING INTEFACE destina-se a tornar o comércio mais fácil e mais rápido, mas não está destinado a ser executado sem supervisão. NÃO DEIXE A NEGOCIAÇÃO AUTOMÁTICA NÃO ATENDIDA COMO CERTAS CIRCUNSTÂNCIAS PODEM OCORRER COMO FALHA NA INTERNET, FALHA DE ENERGIA, OUTRA SITUAÇÃO INESPERADA QUE PODE LEVAR A PERDA FINANCEIRA SÉRIA. Basta executar o instalador e seguir as instruções. Veja CHANGE LOG abaixo para uma lista detalhada das mudanças. AmiBroker 4.70 ou superior. Recomendado AmiBroker 5.30 especialmente no Vista e Windows 7. Estação de trabalho TWS (DEMO, PaperTrading é OK) de interativo corretores. Versão preferida: 907 ou superior. NÃO use TWS versão 945.1 - é buggy, especialmente a versão web. O IB Controller (BrokerIB. EXE) é um aplicativo separado que atua como um buffer entre AmiBroker e Interactive Brokers TWS. Ele aceita comandos do AmiBroker e envia ordens para recuperar informações do TWS. Também permite cancelar pedidos de remessa manualmente. A aplicação do controlador IB é executada automaticamente pelo AmiBroker se a fórmula contiver a seguinte chamada: Após esta chamada o aplicativo BrokerIB. EXE (IB Controller) é iniciado ea variável ibc contém o ponteiro para o objeto de automação OLE que possui vários métodos (funções) que Permitir a placemodifycancel encomendas via TWS e consultar informações da carteira. Esses métodos (funções) são chamados como quaisquer métodos de objetos de automação, por exemplo: if (ibc. IsConnected ()) verificar se a conexão com IB foi bem sucedida ibc. PlaceOrder (quotMSFTquot, quotBUYquot, 100, quotMKTquot, 0, 0, quotDAYquot, False ) Ordem do lugar, mas não transmitir ainda Note que esta é de baixo nível de interface para usuários avançados que é disponibilizado na chamada fase-um de implementação de negociação automatizada via IB. Haverá uma interface de nível mais alto que será implementada mais tarde. Métodos do Controlador IB (Funções): Esta função coloca uma nova ordem. A função retorna o OrderId (string) que pode ser mais tarde usado para modificar o status de consulta do pedido. Parâmetros: Ticker - string que especifica o símbolo de securitycontract a ser comprado. O símbolo deve seguir a simbologia definida em detalhe em: amibrokerib. html Ação - especifica a ação a ser tomada, os valores possíveis são: quotBUYquot, quotSELLquot, quotSSHORTquot Quantidade - o número de sharescontracts para buysell Tipo - especifica o tipo de ordem, os valores possíveis são: quotMKTquot Consulte a documentação do Interactive Brokers TWS para obter mais informações sobre os tipos de ordem LimitPrice - isso define o preço limite para as ordens limite e stop limit StopPrice - isso define stop Preço para ordens de parada TimeInForce - define o tempo em vigor da ordem, os valores possíveis são: quotDAYquot, quotGTCquot, quotIOCquot, quotGTDquot A partir de v1.0.8 TimeInForce campo em PlaceOrderModifyOrder aceita GTD e GAT especificações GTD - Good Till Date - indica que a ordem Deve permanecer trabalho até a hora e data definida. Good Till Data especificação GTD YYYYMMDD HH: MM: SS TZONE onde: AAAA é 4 dígitos ano MM é 2 dígitos mês DD é 2 dígitos dia HH é 2 dígitos hora MM é 2 dígitos minuto SS é 2 dígitos segundo (OPCIONAL) TZONE é tempo Zona (OPCIONAL) Após as especificações TimeInForce (DAY, GTC, GTD) você pode adicionar parte GoodAfterTime (GAT) extra. A parte GAT vem depois de ponto e vírgula. Indica que o comércio deve ser apresentado após a data e hora estabelecidas: DAYGAT AAAAMMDD HH: MM: SS TZONE - ordem do dia válida após data especificada GTCGAT AAAAMMDD HH: MM: SS TZONE - bom até ordem cancelada válido após o tempo especificado GTD yyyymmdd hh: Mm: ss tzoneGAT AAAAMMDD HH: MM: SS TZONE - GTD ordem válida após o tempo especificado onde: AAAA é 4 dígitos ano MM é 2 dígitos mês DD é 2 dígitos dia HH é 2 dígitos hora MM é 2 dígitos minuto SS é 2 dígito segundo (OPCIONAL) TZONE é fuso horário (OPCIONAL) Nota: deve haver NENHUM espaço representado entre ponto-e-vírgula e string GAT. Ibc. PlaceOrder (ordem de fim de dia bom depois de 14 de dezembro de 2005, 18:00 GMT ibc. PlaceOrder (MSFT. BUY. 100. LMT 27. 0. GTD 20051215 17:00:00 GMTGAT 20051214 18:00:00 GMT Verdadeiro) - ordem de limite válida a partir de 14 de Dezembro de 2005 18:00 a 15 de Dezembro de 2005 17:00 GMT ibc. PlaceOrder (MSFT) COMPRA 100. LMT 27. 0. GTD 20051215 19:00:00 GMT Verdadeiro) - ordem de limite válida a partir de agora até 15 de dezembro de 2005 19:00 GMT Transmit - bandeira booleana que especifica se a ordem dada deve ser Realmente transmitida para a troca. Se este sinalizador estiver definido como FALSO, então a ordem NÃO será transmitida, mas aparecerá na estação de trabalho TWS para que você possa pressioná-la manualmente manualmente parâmetros adicionais para IBController 1.0.4 ou superior: TickSize - define flutuação de preço mínima permitida para símbolo dado expresso em pips (0.0001 ). Para a maioria das ações dos EUA é 100 (representa 0,01 mover), para a maioria das moedas: 1 (representa 0.0001 mover), se mover mínimo é inferior a 0.0001 você pode usar valores fracionários, por exemplo, 1100 para 0.000001 move. additional parâmetros para IBController 1.0.8 Ou superior: Atributos - é uma seqüência de caracteres que permite especificar atributos de ordem adicionais (lista separada por vírgula).outsideRTH - se especificado significa que a ordem será acionada não somente durante as Horas de Negociação Regular (RTH), mas também na negociação estendida Aplica-se a ordens de parada, ordens condicionais e alertas é usado pela lógica de disparo. Se não for especificado (falso) ordens irá disparar apenas durante RTH. AllOrNone - preencher tudo ou nada em todos os eTradeOnly - comércio com aspas eletrônicas apenas firmQuoteOnly - comércio com aspas apenas versão 1.1 ignoreRth rthOnly sinalizadores são OBSOLETE agora e não suportado como TWS API caiu suporte para aqueles. Por padrão, todos os sinalizadores são INACTIVOS (OFF) Exemplo: ibc. PlaceOrder (MSFT, 1000. LMT 27. 0. GTD 20051215 19:00:00 GMT, 100. allOrNone) (Observe que o parâmetro opcional TickSize MUST Ser especificado se você quiser usar Atributos) ParentID - é uma string que especifica o identificador de pedido pai (retornado por chamada PlaceOrder anterior), permitindo que você coloque pedidos BRACKET. ParentID ibc. PlaceOrder (MSFT, BUY, 1000. LMT, 27. 0. GTC, False) ibc. PlaceOrder (MSFT, SELL, 1000. LMT, 28. 0. GTC, False, 100., parentID) ibc. PlaceOrder MSFT VENDER 1000. STP 26. 26. GTC True 100. .. parentID) Observe que o sinalizador TRANSMIT é definido como FALSE em todas as ordens do suporte, exceto o último. Isso garante que as ordens aguardam até que o conjunto de ordens do suporte seja concluído. Definir Transmit flag para TRUE na última transmite todo o suporte. OCAGroup - parâmetro de string opcional (novo em 1.1.0) que permite definir grupo de ordens OCA (One-Cancels-All) Ordens de grupo OCA trabalham conjuntamente umas com as outras, quando uma ordem dentro do grupo é executada as ordens restantes são canceladas . Para obter mais informações, consulte: interactivebrokersphpwebhelpMakingTradesCreateOrderTypesoca. htmExemplo: ibc. PlaceOrder (MSFT, SELL, 1000. LMT, 28. 0. GTC, True, 100., 0. MYGROUP) ibc. PlaceOrder (MSFT. 26. GTC True 100. 0. MYGROUP) OCAType - parâmetro numérico opcional (novo em 1.1.0) que permite controlar a maneira como as ordens do OCAGroup são tratadas quando uma ordem no grupo é preenchida parcialmente. Os valores possíveis são: 1 CANCELWITHBLOCK - outras ordens são canceladas 2 REDUCEWITHBLOCK - outras ordens são reduzidas em tamanho e a proteção de excesso é ON 3 REDUCENONBLOCK - outras ordens são reduzidas em tamanho e proteção de overfill está desativada O valor padrão é 3 FAParams - Em 1.1.0) - para uso com FA (Financial Advisor aka FamilyampFriends) contas. Permite especificar o grupo, perfil, método e porcentagem de alocação de contas de FA. Esses quatro parâmetros devem ser fornecidos como seqüência separada por ponto e vírgula: quotFAGroupFAProfileFAMethodFAPercentagequot. Se algum parâmetro não for necessário, ele pode ficar vazio, mas você precisa manter pontos-e-vírgulas se houver outros parâmetros necessários. Por exemplo, para especificar a ordem que usa o grupo quotAllquot e usa o método quotEqualQuantityquot, o FAParameter deve ter a seguinte aparência: quotAllEqualQuantityquot: ibc. PlaceOrder (MSFT, BUY, 1000. LMT, 27. 0. GTC. AllEqualQuantity) Se você quiser usar o perfil de alocação personalizado, você pode usar: ibc. PlaceOrder (MSFT, BUY, 1000. LMT, 27. 0. GTC True 100. 0. 0. AllMyCustomProfile) Se FAParams não for fornecido e Você está usando uma conta de FA que IBc usará a alocação padrão de quotAllAvailableEquityquot Observe que, por padrão, o IB Controller faz logon na conta quotAllquot que é quotaggregatequot, ou seja, mantém a soma de todas as posições em todas as subcontas. Conta - parâmetro de string opcional (novo na 1.3.5) - para uso com contas FA (Financial Advisor aka FamilyampFriends). Isso permite especificar a conta de destino para a ordem das contas FampFFA IB em uma única chamada, em vez de confiar na seqüência SetAccountPlaceOrder. Single-call PlaceOrderModifyOrder com especificação de conta permite especificar conta sem se preocupar que outros threadsprocesses podem alternar a conta entre SetAccount () e PlaceOrder (). ModifyOrder (string OrderId. String Ticker. String Ação. Number Quantidade. String Tipo. Number LimitPrice. Number StopPrice. String TimeInForce. Bool Transmit, número opcional TickSize 100, string opcional Atributos quotquot, string opcional ParentID quotquot. String opcional OCAGroup. OCAType, string opcional FAParam, string opcional Account) Esta função modifica a ordem que foi colocada antes, mas ainda não preenchida. Esta função também pode ser usada para modificar ordens que foram enviadas com o sinalizador quotTransmitquot definido como False. Além disso, quando o parâmetro OrderID está vazio, esta função funciona exatamente como PlaceOrder (assim você pode colocar e modificar ordens usando a função ModifyOrder () sozinha) A função retorna o OrderId (string) que pode ser usado posteriormente para modifycancelquery status da ordem Parameters: OrderId - String especificando o orderID a ser modificado (retornado por chamada anterior PlaceOrder ou ModifyOrder). Se este parâmetro estiver vazio então a função coloca uma nova ordem todos os parâmetros restantes são os mesmos que na função PlaceOrder Na versão 1.1.0 uma melhoria foi adicionada à função ModifyOrder que se alguns dos parâmetros opcionais como ParentID, OCAGroup, OCAType, FAParam são Não especificado - então ele usa valores fornecidos anteriormente (durante PlaceOrder). Isso evita, por exemplo, perder ParentID ao chamar ModifyOrder em uma ordem filho sem currect parentID. Esta função cancela a ordem pendente. Verdadeiro - se a ordem pendente foi encontrada e a solicitação de cancelamento foi enviada, False - se não houver nenhuma ordem pendente com especificado OrderId Parâmetros: OrderId - string especificando o orderID a ser modificado (retornado pela chamada anterior PlaceOrder ou ModifyOrder). GetAccountValue (string FieldName) Essa função recupera valores de conta. String representando o valor. Note que se você precisar de número na AFL você deve usar a função de conversão StrToNum que irá converter seqüência de caracteres retornada por esta função para o número. A seqüência vazia é retornada se o campo não existir ou estiver vazio. Parâmetros: FieldName - define o valor a consultar Lista de campos disponíveis (sensível a maiúsculas e minúsculas): 1. Os campos que são independentes de moeda ou expressos em moeda de conta BASE (geralmente totais): AccountCode AccountReady AccountType AccruedCash CashBalance Moeda DayTradesRemaining DayTradesRemainingT1 DayTradesRemainingT2 DayTradesRemainingT3 DayTradesRemainingT4 2. Campos que são fornecidos separadamente para CADA moeda detida na conta, CUR na lista abaixo significa símbolo de moeda, portanto, para os fundos denominados em USD e os títulos, você verá o prefixo de US $. Nota As posições spot Forex IDEALPRO estão incluídas no CURCashBalance aqui. CURAvailableFunds-S CURAccruedCash CURAccruedCash-C CURAccruedCash-S CURAvailableFunds CURAvailableFunds-C CURBuyingPower CURCashBalance CURCurrency CUREquityWithLoanValue CUREquityWithLoanValue-C CUREquityWithLoanValue-S CURExcessLiquidity CURExcessLiquidity-C CURExcessLiquidity-S CURFullAvailableFunds CURFullAvailableFunds-C CURFullAvailableFunds-S CURFullExcessLiquidity CURFullExcessLiquidity-C CURFullExcessLiquidity-S CURFullInitMarginReq CURFullInitMarginReq-C CURFullInitMarginReq - S CURFullMaintMarginReq CURFullMaintMarginReq-C CURLookAheadAvailableFunds-S-S CURFullMaintMarginReq CURFutureOptionValue CURFuturesPNL CURGrossPositionValue CURGrossPositionValue-S CURInitMarginReq CURInitMarginReq-C CURInitMarginReq-S-S CURLeverage CURLookAheadAvailableFunds CURLookAheadAvailableFunds-C CURLookAheadExcessLiquidity CURLookAheadExcessLiquidity-C-S CURLookAheadExcessLiquidity CURLookAheadInitMarginReq CURLookAheadInitMarginReq-C-S CURLookAheadInitMarginReq CURLookAheadMaintMarginReq Curlo okAheadMaintMarginReq-C CURLookAheadMaintMarginReq-S CURLookAheadNextChange CURMaintMarginReq CURMaintMarginReq-C CURMaintMarginReq-S CURNetLiquidation CURNetLiquidationByCurrency CURNetLiquidation-C CURNetLiquidation-S CURPreviousDayEquityWithLoanValue CURPreviousDayEquityWithLoanValue-S CUROptionMarketValue CUROptionMarketValue CURRealizedPnL CURSMA CURSMA-S CURStockMarketValue CURTotalCashBalance CURTotalCashValue CURTotalCashValue-C CURTotalCashValue-S CURUnalteredInitMarginReq CURUnalteredMaintMarginReq CURUnrealizedPnL Quando a moeda não for especificado IBc primeiro procura por valores especificados na moeda BASE e se não for encontrado, em seguida, usa USD como padrão, para que você possa usar GetAccountValue antigo (quotAvailableFundsquot) e ele retornará o mesmo como GetAccountValue (quotUSDAvailableFundsquot) - porque há fundos disponíveis não são especificados em moeda base. Se você, entretanto, chamar GetAccountValue (quotTotalCashBalancequot) ele irá reportar na moeda BASE e ele pode ser diferente de GetAccountValue (quotUSDTotalCashBalancequot), que representará somente em dólares americanos. As diferenças ocorrerão se você tiver posições de caixa em muitas moedas de modo que a moeda quotbasequot mostre o total bruto de todas as posições em todas as moedas como se fossem trocadas na moeda base GetExecInfo (string OrderId,. String Field) Essa função recupera o valor do Field of OrderId Ordem da lista de execução o valor numérico ou sting do campo solicitado para OrderId. Nulo se nenhum campo ou nenhuma posição disponível Parâmetros: OrderId - string que especifica a ordem (retornada pela função PlaceOrder ou recuperada por GetExecList). Campo - um dos nomes de colunas encontrados na página quotExecutionsQuin do IB Controller. Por exemplo quotAvg. Pricequot dá o preço médio de compra de determinado valor, quotFilledquot dá número de sharescontracts cheio GetExecList (number Type. String Filter) (novo em 1.3.0) Retorna lista de ordens separadas por vírgulas de lista de execuções Parâmetros: Type - especifica o que deve ser retornado 0 - dá ORDERIDs (atualmente este é o único valor aceito) Filter - quando não está vazio, ele informa ao IBc que apenas pedidos com status especificado devem ser retornados quando vazio - todas as ordens da lista pendente são retornadas. Ibc. GetPendingList (0.) - retorna a lista de todos os IDs de pedido presentes na lista de execuções de citação Para extrair símbolos da lista use este tipo de loop: I) printf (Símbolo: símbolo n) execlist ibc. GetExecList (0.) lista todas as ordens das execuções página execinfo para (i 0 (OId StrExtract (execlist, i)) I) execinfo execinfo OID Símbolo: ibc. GetExecInfo (OID, Symbol) Preenchido: ibc. GetExecInfo (OID, Preenchido) Méd. Preço: ibc. GetExecInfo (OID, preço médio) n Esta função retorna o texto da última mensagem de erro que representa a mensagem de erro. Empty no caso quando não havia nenhuma mensagem de erro ou não há nenhuma ordem OrderId - especifica o id da ordem para consultar as últimas informações sobre o erro. Há um valor especial que você pode passar: 0 (zero) e tem um significado especial: ele recupera a última mensagem de erro para qualquer ordem. Esta é exatamente esta mensagem que aparece na parte superior da lista de erros na interface do usuário IBController. GetStatus (string OrderId. Booleano opcional InclFilled) Esta função recupera o status da ordem pendente. String que descreve o status, pode ser: quotNotYetTransmittedquot, quotPreSubmittedquot, quotPendingquot, quotCancelledquot, quotSubmittedquot, quotFilledquot, quotErrorquot (new in 1.0.2), quotInactivequot ou empty when matching order was not found Dependendo do campo InclFilled alguns status são intermitentes. Se o InclFilled não for especificado ou for igual a false (zero), somente estados quotNotYetTransmittedquot, quotPendingquot, quotPreSubmittedquot, quotSubmittedquot serão relatados consistentemente. QuotCancelledquot e quotFilledquot status são intermittent porque essas ordens são removidas da lista de pedidos pendentes dentro de um segundo de cancelamento de preencher a ordem (isso vai mudar no futuro). QuotErrorquot status significa que houve um erro durante o processamento de última solicitação para placemodify uma ordem e você pode consultar informações de erro detalhadas usando a função GetLastError. Se InclFilled estiver definido como True, também os status dos pedidos listados na lista quotExecutionsquot serão relatados e isso significa que você pode obter quotCancelledquot, quotFilledquot, quotErrorquot, quotInactivequot consistentemente. Nota: O parâmetro InclFilled foi introduzido em 1.0.8. Parâmetros: OrderId - seqüência de caracteres especificando o orderID a ser modificado (retornado por uma chamada anterior PlaceOrder ou ModifyOrder). GetPositionInfo (string Ticker. String Field) Essa função recupera o valor do símbolo Field of Ticker mantido atualmente no portfólio IMPORTANT CHANGE in 1.1.0. A função NÃO relata posições com tamanhos zero mais o valor numérico do campo solicitado para Ticker. Nulo se nenhum campo ou nenhuma posição disponível Parâmetros: Ticker - string que especifica o símbolo de securitycontract. O símbolo deve seguir a simbologia definida em detalhe em: amibrokerib. html Campo - um dos nomes de colunas encontrados na página quotPortfolio do IB Controller. Por exemplo, quotAvg. Costquot dá o custo médio de compra de determinado valor, quotUnrealized PNLquot dá lucros e perdas não realizados. Esta função recupera o número de contratos de partes do símbolo de Ticker mantido atualmente no portfólio o número que descibes o tamanho da posição atualmente mantida para Ticker. Os números positivos significam a posição longa, os números negativos significam a posição curta, zero significa que o ticker dado não é prendido no portfolio Parâmetros: Símbolo - corda que especifica o símbolo de securitycontract. O símbolo deve seguir a simbologia definida em detalhe em: amibrokerib. html IsConnected () Esta função recupera o status de conexão para TWS. 0 - NÃO conexão 1 - conexão em andamento 2 - significa conexão OK, sem mensagens 3 - conexão OK, mas TWS gerou algumas mensagens warnerror (veja aba quotMessages) IsOrderPending (string OrderId) Esta função verifica se a ordem dada está pendente transmitido). Verdadeiro - se a ordem ainda estiver na lista pendente, False se a ordem foi Preenchida, cancelada ou não existe nenhuma ordem. Parameters: OrderId - string especificando o orderID a ser modificado (devolvido pela chamada anterior PlaceOrder ou ModifyOrder). Retorna a lista de símbolos separados por vírgulas das posições atualmente abertas. MUDANÇA IMPORTANTE em 1.1.0. A função NÃO relata posições com tamanhos zero mais lista de posições abertas e seus tamanhos ibc GetTradingInterface (IB) para (i 0 (símbolo StrExtract (openpos, i)) i) printf (Posição i tSímbolo: símbolo tSize: ibc. GetPositionSize )) N) Retorna a lista separada por vírgulas das ordens da lista pendente Parâmetros: Tipo - especifica o que deve ser retornado 0 - dá ORDERIDs, 1 dá listas de símbolos Filtro - quando não vazio, informa IBc que somente pedidos com status especificado devem ser retornados quando vazios - todas as ordens da lista pendente são retornadas. Ibc. GetPendingList (1. Pendente) - retorna uma lista separada por vírgulas de símbolos de pedidos pendentes ibc. GetPendingList (0. Erro) - retorna a lista De orderids que têm símbolos de erros ibc. GetPendingList (0. Cancelado) - retorna cancelado orderids (lembre-se de que a ordem cancelada são automaticamente removidos da lista após alguns segundos) símbolos ibc. GetPendingList (0.) - retorna a lista de todos os OrderIDs Para extrair símbolos da lista use este tipo de laço: for (i 0 (símbolo StrExtract (símbolos, i)) i) printf (Símbolo: símbolo n) CloseAllOpenPositions (opcional String Ticker) (novo em 1.0.8) Envia ordens para fechar todas as posições atualmente abertas. Envia a ordem do MERCADO SELLBUY para cada posição de LONGSHORT na página da carteira - deve efetivamente fechar todas as posições abertas (desde que as ordens de fechamento sejam preenchidas corretamente), observe no entanto que pode acontecer que essas ordens finais possam falhar (por exemplo, quando os mercados estão fechados ) Novo na função 1.1.0: now aceita parâmetro opcional. Quando é fornecida, a função fecha as posições apenas no ticker especificado. Se não for especificado - funciona como anteriormente (fecha posições em todos os símbolos). Cancela todas as ordens pendentes Envia o cancelamento para todas e cada ordem exibida na página Pedidos pendentes (com exceção das ordens com Erros) Novo na função 1.1.0: now aceita o parâmetro opcional . Quando é fornecido, a função cancela ordens apenas do ticker especificado. Se não for especificado - funciona como anteriormente (cancela todas as ordens pendentes em todos os símbolos). OrderID - seqüência de caracteres especificando o orderid retornado por PlaceOrder Retorna não-zero (true) quando orderid foi encontrado na lista de pedidos pendentes e zero caso contrário. Transmit (string OrderID) (new em 1.0.8) Modifica o sinalizador de transmissão na ordem NotYetTransmitted. Isso não significa necessariamente que a transmissão foi bem sucedida. Transmit (orderid) é usado para transmitir ordens previamente colocadas com sinalizador de transmissão definido como false. Transmitir internamente é tratado chamando quotmodify orderquot função (então você não precisa especificar os mesmos parâmetros novamente), mas note que o TWS tem problemas com manipulação de solicitações de modificação vindo muito rápido, assim você não será capaz de chamar modifytransmit immediatelly depois de colocar ordem com transmitir falso. Nesses casos, recomendamos o uso de disparador manual que é lento o suficiente para não causar problemas. Exemplo: ibc. Transmit (orderid) Esta é a função EXPERIMENTAL. Suspende a execução para o número especificado de milissegundos. Por favor, não use esta função a menos que você realmente tem que. Porque bloqueia IBController e AmiBroker por período de tempo especificado e ambos os aplicativos não responderão às ações do usuário (como entrada de teclado do mouse). Se você suspender a execução por mais de alguns segundos, o AmiBroker reclamará que o servidor OLE não responde. Exemplo: ibc. Sleep (1000) sleep por 1000 milissegundos 1 segundo Apaga a lista de exibição especificada. Onde ListNo pode ser: 0 - lista de ordem pendente 1 - lista de execução 2 - lista de portfólio 3 - lista de informações de conta 4 - lista de mensagens de erro -1 - significado especial (novo em 1.3.5) - limpar TODAS as listas ibc. ClearList (4) Limpa a lista de mensagens de erro Note que esta função afeta somente a tela, NÃO afeta o status das ordens. Portanto, se você tiver quaisquer pedidos ativo, as ordens de quotpending, quotexecutionsquot listas serão re-cheias com ordens atualmente ativas durante a próxima atualização de status (geralmente dentro de fração de segundo - por isso pode não ser visualmente perceptível) - eles serão re-cheios com a próxima atualização da conta - geralmente em poucos segundos. SetAccount (string Account) (novo no 1.1.0, alterado em 1.3.5) IMPORTANTE: A funcionalidade desta função foi alterada em 1.3.5 apenas para contas FA (consultor financeiro). Define a conta ativa para as próximas chamadas PlaceOrder () ModifyOrder (). Observe que também é possível agora especificar a conta de destino diretamente por meio de parâmetro passado para PlaceOrderModifyOrder em vez de depender de SetAccount (). SetAccount () não limpa listas mais e não muda a conta de visualização como fez nas versões pré-1.3.5. Limpar a execução ea lista pendente foi problemática porque ao mudar de conta as informações sobre pedidos enviados anteriormente em contas diferentes foram perdidas nas contas do FampF. Assim SetAccount () não limpa listas automaticamente. Se você quiser fazer isso, você pode chamar ClearList (-1) explicitamente. Além disso, esta função NÃO altera a conta que é exibida nas guias de janela infoquot quotaccount e quotportfolioquot. Para alterar a conta exibida na página de informações do quotaccount e as abas quotportfolioquot, use a nova função SetInfoAccount (). A separação de contas de ordem e exibição permite direcionar ordens para qualquer conta alterando qualquer exibição, isto é, você pode monitorar uma conta quotAllquot - que exibe informações cumulativas para todas as contas FampFFA ou qualquer outra conta ao fazer pedidos para outras contas. Por padrão, as informações de visualização são a conta quotALLquot e, na maioria dos casos, não é necessário alterá-lo à medida que recebe atualizações de todas as subcontas. SetInfoAccount (string Account) (novo em 1.3.5) Esta função altera a conta que é exibida na janela informationquot quotaccount e tabs quotportfolioquot. Não muda a conta usada para ordens. A separação de contas de ordem e exibição permite direcionar ordens para qualquer conta alterando qualquer exibição, isto é, você pode monitorar uma conta quotAllquot - que exibe informações cumulativas para todas as contas FampFFA ou qualquer outra conta ao fazer pedidos para outras contas. Por padrão, as informações de visualização são a conta quotALLquot e, na maioria dos casos, não é necessário alterá-lo à medida que recebe atualizações de todas as subcontas. Observe que o IB usa quotAquot subscript para designar quotAllquot conta que é agregado de todas as subcontas. Portanto, se sua conta FA tiver um número de F1234, você precisará adicionar um sufixo QuotAquot para obter dados agregados: Fecha a conexão com o TWS e a reabre, limpa todas as listas e requerimentos para pedidos pendentes. Essencialmente, dá o mesmo efeito que você conseguiria ao terminar e re-executar o IB Controller. 1. Colocar e transmitir Ordem de Compra de Mercado para 100 ações quando o MACD cruza acima da linha de sinal: Compre Cross (MACD (), Signal ()) se (LastValue (Buy)) ibc GetTradingInterface (IB).IsConnected ()) verifique se não temos posição aberta sobre este estoque if (ibc. GetPositionSize (Name ()) 0) ordem de transmissão ibc. PlaceOrder (Name (), Buy. 100. MKT 0. 0. Dia True) 2. Modificação de uma ordem de limite no preço atual mais 0,10, mas sem transmissão (transmissão manual obrigatória). Este código pode ser executado muitas vezes e irá modificar a ordem existente, desde que não seja transmitida. Ele usa variáveis ​​estáticas para armazenar orderId da última execução. Comprar ibc GetTradingInterface (IB) verificar se estamos conectados OK se (ibc. IsConnected ()) fazer encomendas somente se não tivermos já Posição aberta no símbolo if (ibc. GetPositionSize (Name ()) 0) recupera orderID da execução anterior, ficará vazia se nenhuma ordem foi colocada antes de OrderID StaticVarGetText (OrderID Name ()) colocar ou modificar a ordem - não transmitir ainda OrderID Ibc. ModifyOrder (OrderID, Name (), COMPRAR 100. LMT LastValue (C) 0.10 0. Dia. False) armazenar id de pedido para a próxima execução assim que sabemos qual ordem para modificar StaticVarSetText (OrderID Name (), OrderID) 3 Colocando a modificação manual a partir da caixa de diálogo Parâmetros. Código a ser aplicado no Indicator Builder. (Modificado para usar novos recursos em 1.0.2) Este código pode ser executado muitas vezes e ele irá modificar a ordem existente, desde que não seja transmitido. Ele usa variáveis ​​estáticas para armazenar orderId da última execução. Param bloco TriggerOrder ParamTrigger (Ordem de lugar Clique aqui para colocar ordem) Modo ParamToggle (Modificar existingAlways colocar nova ordem) ACT ParamList (Acção. BUYSELLSSHORT) OT ParamList (Tipo de ordem. MKTLMTSTP) TIF ParamList (Time In Force DAYGTCIOC) Ticker ParamStr (Nome do Ticker ()) NumShares Param (Número de Ações 10. 10. 100. 10) LimitPrice LastValue (C) Param (Desvio do Preço Limite 0, - 0.1 0.1 0.01) StopPrice LastValue (C) Param ( Parar o deslocamento de preço 0, - 0,1 0,1 0,1 0,01) Transmit ParamToggle (Transmit. Não transmitTransmit. 0) TriggerCancel ParamTrigger (Ordem de Cancelar Clique aqui para Cancelar ordem) Msg esta variável armazena mensagem de erro texto criar instância da interface de negociação ibc GetTradingInterface (IB) recupera orderID de execução anterior, estará vazio se nenhuma ordem foi colocada antes de OrderID StaticVarGetText (OrderID Ticker) se (TriggerOrder) verificar se estamos conectados OK se (ibc. IsConnected ()) if (Modo 1) OrderID i F modo definido como sempre novo, em seguida, limpar orderid colocar ordens apenas se não tivermos já posição aberta neste símbolo colocar ou modificar a ordem - não transmitir ainda ID do pedido ibc. ModifyOrder (OrderID, Ticker, ACT, NumShares, OT, LimitPrice, StopPrice , TIF, Transmit) armazenar orderID para a próxima execução, então sabemos qual ordem para modificar StaticVarSetText (OrderID Ticker, OrderID) se (Modo 1) Msg Nova ordem foi colocada com ID else Msg Order placemodified com ID Msg Msg OrderID on Now () Else Msg A ordem de colocação falhou devido a nenhuma conexão com o TWS se (TriggerCancel) if (OrderId) if (ibc. CancelOrder (OrderId)) Msg Solicitação para cancelar o pedido OrderID enviado com êxito else Msg Pedido para cancelar o pedido OrderID falhou. Else Msg Não é possível cancelar a ordem becase OrderID está vazia execlist ibc. GetExecList (0.) all execinfo for (i 0) (ODI StrExtract (execlist, i)) i) execinfo execinfo OID Símbolo: ibc. GetExecInfo (OID, Symbol) Preenchido: Ibc. GetExecInfo (OID, preenchido) Preço: ibc. GetExecInfo (OID, Preço médio) n código de monitoração Título Msg nLast TWS mensagem: ibc. GetLastError (0) nFundos disponíveis: ibc. GetAccountValue (AvailableFunds) Pos. Value: ibc. GetAccountValue( GrossPositionValue ) nOrderID OrderId nTicker Ticker nAction ACT nShares NumToStr (NumShares, 1.0 ) nOrderType OT nLimitPrice NumToStr (LimitPrice, 1.3 ) nStopPrice NumToStr (StopPrice, 1.3 ) nTimeInForce TIF nTransmit NumToStr (Transmit, 1.0 ) n nGetStatus ibc. GetStatus( OrderID ) nGetPositionSize ibc. GetPositionSize( Ticker ) nIsConnected NumToStr (ibc. IsConnected(), 1.0 ) nExecInfon execinfo 4. Placing bracket order create instance of trading interface ibc GetTradingInterface ( IB ) parentID ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTC. False ) ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. False . 100. . parentID ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 26. 26. GTC. True . 100. . parentID ) Note that TRANSMIT flag is set to FALSE on all bracket orders except the last one. This ensures that orders wait until bracket order set is completed. Setting Transmit flag to TRUE on the very last one transmits entire bracket. 5. Iterating through open positions: ibc GetTradingInterface ( IB ) for ( i 0 ( symbol StrExtract ( openpos, i ) ) i ) printf ( Position i tSymbol: symbol tSize: ibc. GetPositionSize( symbol ) n ) 6. Placing OCA group orders: ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. True . 100. . 0. MYGROUP ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 26. 26. GTC. True . 100. . 0. MYGROUP ) 1) Why IBController has BETA status The reason is simple - because it relies on IB API we have no control upon. You need to be aware of the fact that Interactive Brokers may and actually do change TWS and API quite often and any future changes in the APITWS may produce incompatiblities without any warning. We try to adjust IBController as soon as such incompatibilities surface, but we can only do that quotafter the factquot. Due to this there can be periods when IBController does not work properly with certain version(s) of TWS. That is the only reason why IBController is marked as BETA. 2) What exactly is the OrderID, where is the number stored How does it increment Can we assign our own OrderIDs OrderID is a string that represents the unique order number that is assigned by IB Controller (for orders placed via IB Controller) or TWS (for orders placed in TWS) when you place the order. It is automatically incremented on each NEW order. The implementation takes care that generated ID is unique for given session of TWS. You should NOT assign your own IDs because you may risk generating duplicates that will be rejected by TWS. 3) The IB Interface contains a lot of useful information, can we access this information in afl GetAccountValue() function (introduced in 1.0.2) allows that. 4) IMPORTANT. During development i often quotlosequot my connection to the TWS and cannot get it going again. Under what conditions candoes this happen This is probably caused by placing ModifyOrder calls too often so TWS is not able handle them and sends error messages (quotUnable to modify this order as its still being processedquot) and it results in IsConnected() returning false. This should be addressed by next version. If such thing happens you can simply close IB Controller window. 5) Is it possible to read IB LastBifAsk prices while running a eSignal database Right now there is no access to price data via IBController but maybe in the future 6) Why do we have a PlaceOrder() and a ModifyOrder(), if ModifyOrder can be used in both cases Just for completeness. Indeed ModifyOrder alone would be enough. 7) Can we retrieve the quotExecutionsquot and quotPendingquot page (string) from the IB Controller window, for display on the chart Pending - yes you can retrieve the status of the order while it is on quotPendingquot page using GetStatus. As for quotexecutionquot tab - as it is already described in the read me this is in the works. 8) It appears the startup sequence of TWS and AB is significant, is it Not actually TWS and AB - they are independent. But what is important to run TWS before running IB Controller. If you however have your trading code in indicator then it may be auto-refreshed at AB start and in this individual case you would need to run TWS before AB. Anyway if something fails you can simply close IB controller window and it will re-open automatically and reconnect on next call to GetTradingInterface. 9) When the TWSAB connection is broken during trading, what is the best way to restore it Close IB Controller manually. It will re-open automatically and reconnect on next call to GetTradingInterface. 10) What is the consequence of repeated PlaceOrder() or ModifyOrder() execution due to AB Refresh What happens when, instead of using Cross() with use quotgtquot or quotltquot Franly auto-trading interface is NOT indented to be used in indicators. It is intended to be used in AA window. But if you prefer to run it in IB you can do this too, but then you should check pending orders and check portfolio position size for given symbol not to buy too many shares. To answer your question: multiple PlaceOrder calls will result in multiple orders placed. Multiple ModifyOrder() calls may result in the same (if OrderID is empty) or may just result in updating the values of already exisiting, pending order if you specify correct OrderID of order placed before (see the example 2.) 11 ) A quotclearquot Message button would be nice in the IBc window, i have to scroll down continuously to see the latest message (perhaps last-on-top scrolling) It is already available in version 1.0.2 12) What is the best way to write a single-(user initiated)-execution line of code. this is where the ParamTask() i suggested earlier would come in handy. Use new AFL ParamTrigger function ParamTrigger( quotNamequot, quotButton textquot) - to be used in indicator builder - to create triggers (buttons). If you place ParamTrigger in the indicator code it will create a quotbuttonquot in Parameter dialog that can be pressed. Normally ParamTrigger will return zero (0) but when button in the param window is pressed then it will refresh the chart and ParamTrigger will return 1 (one) for this single execution (further refreshes will return zero, until the button is pressed again) trigger ParamTrigger ( Place Order. Click here to place order ) if ( trigger ) your one-shot code here 13) When placing orders from an indicator (the thing to do in RT trading) and editing the code will result in additional afl executions, how can i prevent randon order placement from the extra passes Parameters and Signals may not be the same as a result of using loops, DLLs, and things. Use static variables as given in example 2 to MODIFY existing order instead of placing many new orders. Or use code given in response to question 10 14) I got an warning from TWS that is treated as error in Pending list. How can I solve that You can put specific TWS code onto quotIgnore listquot (use File-gtError code ignore list to enter codes in comma separated list). Any code entered here will be ignored by Pending List page, but still will be displayed in the messages window. 15) some message in the IBc are not clearprecise in their meaning. Well these messages come from TWS and I have no influence on their wording :-) CHANGES FOR VERSION 1.3.8 removed the workaround introduced in 1.3.5 for symbol translation because it caused problems for symbols like 6EU0-GLOBEX-FUT where symbol is not equal to local symbol less expiration code (EUR vs 6E). Instead symbol translation now relies solely on method introduced in 1.3.6 CHANGES FOR VERSION 1.3.7 GetPositionList() returned empty symbol part for non-stocks. Fixed PlaceOrder failed on Financial advisor accounts when non-master Account was passed in a parameter without preceding SetAccount call. Fixed. CHANGES FOR VERSION 1.3.6 IBController now uses more reliable way to translate from local symbol to TWS symbolexpiry pair based on information sent back by TWS. (It is not as simple as one may think because sometimes local symbol does not contain TWS symbol, so one can not derive TWS symbol from local symbol in general case, for example FESX SEP 10 local symbol translates to ESTX50,20100917, therefore IBController needs to get info from TWS) CHANGES FOR VERSION 1.3.5 New SetInfoAccount( account ) This function changes the account which is displayed in the quotaccount informationquot window and quotportfolioquot tabs. It does NOT change account used for orders. Separation of order and viewing accounts allows directing orders to any account withing changing any views, i. e. you can monitorview quotAllquot account - that displays cumulative information for all FampFFA accounts or any other account while placing orders for other accounts. By default viewing information is the quotALLquot account and in most cases there is no need to change it as it receives updates from all sub-accounts. To workaround recent change in TWS, for futures (FUT) symbol field is set by IBController as localsymbol without expiration monthyear. This is temporary workaround which may be broken by other TWS releases. Tested to work with TWS 907.7Pending OrdersExecutionsPortfolioAccount info tabs now have additional command quotAccountquot that specifies the account given item refers toPlaceOrder and ModifyOrder now accept optional Account parameterThis allows to specify destination account for order for FampFFA IB accounts in single call, instead of relying on SetAccountPlaceOrder sequence. Single-call PlaceOrderModifyOrder with account specification allows to specify account without worrying that other threadsprocesses can switch the account between SetAccount() and PlaceOrder(). Now SetAccount() only sets account for NEXT order(s). It does NOT clear lists anymore and does NOT change viewing accountClearing execution and pending list was problematic because when switching accounts the information about previously sent orders on different account was lost on FampF accounts. So SetAccount() does not clear lists automatically. If you want to do this, you can call ClearList( -1 ) explicitely. Also this function does NOT change the account which is displayed in the quotaccount informationquot window and quotportfolioquot tabs. To change account displayed in the quotaccount informationquot page and quotportfolioquot tabs use new function SetInfoAccount(). Separation of order and viewing accounts allows directing orders to any account withing changing any views, i. e. you can monitorview quotAllquot account - that displays cumulative information for all FampFFA accounts or any other account while placing orders for other accounts. By default viewing information is the quotALLquot account and in most cases there is no need to change it as it receives updates from all sub-accounts. ClearList() method accepts -1 as listno - then it clears ALL lists CHANGES FOR VERSION 1.3.2 fixed compatibility issues with TWS version 904 CHANGES FOR VERSION 1.3.1 added configuration file to support AmiBroker 5.30 trading from chart functionality CHANGES FOR VERSION 1.3.0 added GetExecList and GetExecInfo functions. CHANGES FOR VERSION 1.2.1 The IBc now accepts new symbology convention with 4th part defining currency: SYMBOL-EXCHANGE-TYPE-CURRENCY. When currency is not specified USD is used as default. For more info see amibrokerib. html The IBc also accepts single letter type codes CHANGES FOR VERSION 1.2.0 IBc now allows to define which error codes should be ignored using File-gtError code ignore list upgraded to use latest TWS API 9.41 (tested with latest TWS 885.7, requires at least 879) following TWS API changes ignoreRth and rthOnly flags are removed and replaced with single flag: outsideRTH Quote from TWS DOC interactivebrokersensoftwareapiReleaseNotesapi94.phpibentityllc quotOutsideRTH Flag Replaces quotIgnore Regular Trading Hoursquot and quotRegular Trading Hours Onlyquot Flags Supported in: All API Platforms A new, single order atttibute, bool OutsideRTH(), replaces two flags: ignoreRTH and rthOnly in the Order classstruct. If set to true, this new extended order attribute allows orders to trigger or fill outside of regular trading hours. quot CHANGES FOR VERSION 1.1.1 primaryExchange is now set to empty. This solves quotinvalid symbolquot problem occuring for some accounts during last 2 weeks following apparent changes in IB. CHANGES FOR VERSION 1.1.0 Added handling of error codes 2100, 1100, 1101, 1102, 1300 Financial advisor Account support (FC Issue 69) : Added FA-only fields to PlaceOrderModifyOrder When run on FA account IBc automatically queries for account list and uses quotAllquot account by defaultGetAccountValue now allows to query values separately for each currency. Currency specific values are available using this syntax: CURFieldName where CUR is currency symbol for example: USDAvailableFunds EURAvailableFundsWhen currency is NOT specified IBc first looks for values specified in BASE currency and if not found then uses USD as default, so you can use old-style GetAccountValue(quotAvailableFundsquot) and it will return the same as GetAccountValue(quotUSDAvailableFundsquot) - because there available funds are not specified in base currency. If you however call GetAccountValue(quotTotalCashBalancequot) it will report in BASE currency and it may be different from GetAccountValue(quotUSDTotalCashBalancequot) which will represent USD cash only. Differences will occur if you have cash positions in many currencies so quotbasequot currency shows gross total of all positions in all currencies as if they were exchanged into base currency. added limit of error messages to be displayed (File-gtConfigure)added re-querying for positions after reconnectan option to restartreconnect (File-gtReconnect), new method Reconnect()CancelAllPendingOrders( optional Ticker ) now CancelAllPendingOrders method takes optional parameter Ticker. If it is specified - it cancels orders only for specified symbol. If it is NOT specified - it cancels all orders for ALL symbols. ClearList( iListNo ) method added ClearList( ListNo ) where ListNo can be: 0 - pending order list 1 - execution list 2 - portfolio list 3 - account information list 4 - error message listibc. ClearList( 4 ) clears error message list Note that this function only affects the display, it does NOT affect the status of orders. So if you have any active orders the quotpending ordersquot, quotexecutionsquot lists will be re-filled with currently active orders during next status update (usually within fraction of second - so it may not be visually noticeable) It also applies for portfolio and account information lists - they will be re-filled with next account update - usually within few seconds. CloseAllOpenPositions( optional Ticker ) now CloseAllOpenPosition method takes optional parameter Ticker. If it is specified - it closes positions only for specified symbol. If it is NOT specified - it closes all positions. exchange is reported correctly for non-US stocks in Portfolio pageGetPositionList() - returns only symbols with positions ltgt 0OCA groups support added to PlaceOrderModifyOrderuser-definable port and IP number (File-gtConfigure)SetAccount( AccNo ) - for FA accountsWarning 2107 (Historical Market Data Service inactive) and 2104 (market data OK) is silently ignored now CHANGES FOR VERSION 1.0.8 GetStatus() function now has optional parameter InclFilled GetStatus( string OrderId, optional boolean InclFilled ) when InclFilled is provided and set to true GetStatus function provides statuses for filled, cancelled and error orders that may have been already deleted from pending list. TimeInForce field in PlaceOrderModifyOrder allows now to specify quotGood Till Datequot and quotGood After Timequot datetimes)TimeInForce field in PlaceOrderModifyOrder accepts GTD and GAT specifications GTD - Good Till Date - indicates that the order should remain workign untilthe time and date set. Good Till Date specification GTD YYYYMMDD HH:MM:SS TZONE where: YYYY is 4 digit year, MM is 2 digit month, DD is 2 digit day, HH is 2 digit hour, MM is 2 digit minute, SS is 2 digit second (OPTIONAL), TZONE is time zone (OPTIONAL) After regular TimeInForce specifications (DAY, GTC, GTD) you may add extraGoodAfterTime (GAT) part. GAT part comes AFTER semicolon. It indicates thattrade should be submitted after the time and date set: GAT specifications: DAYGAT YYYYMMDD HH:MM:SS TZONE - day order valid after specified datetime GTCGAT YYYYMMDD HH:MM:SS TZONE - good till canceled order valid after specified time GTD yyyymmdd hh:mm:ss tzoneGAT YYYYYMMDD HH:MM:SS TZONE - GTD order valid after specified time where: YYYY is 4 digit year, MM is 2 digit month, DD is 2 digit day, HH is 2 digit hour, MM is 2 digit minute, SS is 2 digit second (OPTIONAL), TZONE is time zone (OPTIONAL) Note: there must be NO SPACE characted between semicolon and GAT string. ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. DAYGAT 20051214 18:00:00 GMT. True ) - day limit order good after Dec 14,2005, 18:00 GMT ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. GTD 20051215 17:00:00 GMTGAT 20051214 18:00:00 GMT. True ) - limit order valid from Dec 14,2005 18:00 to Dec 15,2005 17:00 GMT ibc. PlaceOrder( MSFT. BUY. 100. LMT. 27. 0. GTD 20051215 19:00:00 GMT. True ) - limit order valid from now until Dec 15,2005 19:00 GMT Portfolio page should now display correct exchange for futures (now it uses reqContractDetails to query for exchange string that is not sent via accountUpdates by TWS) new Transmit( orderID ) method Transmit( string orderid )- returns non-zero (true) when orderid has been found on the pending order listand zero otherwise. It does not necesarily mean that transmit was successful. Transmit( orderid) is used to transmit orders previously placed with transmit flag set to false. Transmit internally is handled by calling quotmodify orderquot function (so you dont need to specify the same parameters again) but note that TWS has problems with handling modify requests coming too quickly, so you will NOT be able to call modifytransmit immediatelly after placing order with transmit false. In such cases we recommend using manual trigger that is slow enough not to cause problems. GetPositionList() method added - returns comma separated list of currently open positionslist of open positions and their sizes ibc GetTradingInterface ( IB ) for ( i 0 ( symbol StrExtract ( openpos, i ) ) i ) printf ( Position i tSymbol: symbol tSize: ibc. GetPositionSize( symbol ) n ) GetPendingList( Type, Filter ) - retrieves comma-separated list of orders from pending listwhere: Type - specifies what should be returned 0 - gives ORDERIDs, 1 gives symbol lists Filter - when not empty it tells IBc that only orders with specified status should be returned when empty - all orders from pending list are returned. symbols ibc. GetPendingList( 0. Pending ) - returns comma separated list of pending order IDs symbols ibc. GetPendingList( 1. Pending ) - returns comma separated list of SYMBOLS that have pending orders symbols ibc. GetPendingList( 0. Error ) - returns list of orderids that have errors symbols ibc. GetPendingList( 0. Cancelled ) - returns cancelled orderids (please keep in mind that cancelled order are automatically removed from the list after few seconds) symbols ibc. GetPendingList( 0. ) - returns list of all orderIDs present in the quotpending listquot (may be pendingerrorcancelledpartially filledsubmitted, etc) added experimental Sleep() methodSleep( number Milliseconds ) - suspends the execution for specified number of milliseconds. Please do NOT use this function unless you really have to, because it locksboth IBController and AmiBroker for specified period of time and both applicationswont respond to user actions (such as mousekeyboard input). If you suspendexecution for more than few seconds AmiBroker will complain about OLE server not responding. added CloseAllOpenPositons(), CancelAllPendingOrders methods and Panic buttonCloseAllOpenPositions() method - sends MARKET SELLBUY order for each and every LONGSHORT position in the portfolio page - should effectively close all open positions (provided that closing orders will fill correctly), note however that it may happen that these closing orders may fail (for example when markets are closed) CancelAllPendingOrders - sends cancel for each and every order displayed in the Pending orders page (with the exception of orders with Errors) Panic button in the toolbar - sends CancelAllPendingOrders() and then CloseAllOpenPositions() Bracket orders support. PlaceOrder and ModifyOrder methods have two additional optional parameters: Attributes and ParentIDPlaceOrder( string Ticker, string Action, number Quantity, string Type, number LimitPrice, number StopPrice, string TimeInForce, bool Transmit, optional number TickSize 100, optional string Attributes quotquot, optional string ParentID quotquot Attributes - is a string that allows to specify additional order attributes (comma separated list). Supported attributes: rthOnly - (OBSOLETE NOW in 1.2.0) if specified means that the order will only be filled during RTH this applies to any order type including limit. ignoreRth - (OBSOLETE NOW in 1.2.0) if specified means that order will trigger not only during Regular Trading Hours (RTH), but also in extended trading (preafter market) this applies to stop orders, conditional orders, and alerts it is used by the triggering logic. If not specified (false) orders will trigger ONLY during RTH. allOrNone - fill all or nothing at all eTradeOnly - tra de with electronic quotes only firmQuoteOnly - trade with firm quotes only By default all those flags are INACTIVE (OFF) Example: ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTD 20051215 19:00:00 GMT. True . 100. allOrNone ) (Note that optional parameter TickSize MUST be specified if you want to use Attributes) ParentID - is a string that specifies parent order identifier (returned by previous PlaceOrder call) allowing you to place BRACKET orders. parentID ibc. PlaceOrder( MSFT. BUY. 1000. LMT. 27. 0. GTC. False ) ibc. PlaceOrder( MSFT. SELL. 1000. LMT. 28. 0. GTC. False . 100. . parentID ) ibc. PlaceOrder( MSFT. SELL. 1000. STP. 0. 26. GTC. True . 100. . parentID ) now IBController does not require API installation CHANGES FOR VERSION 1.0.6 re-compiled with TWS API 8.41 BETA CHANGES FOR VERSION 1.0.5 fixed problem with GetPositionSize() reporting zero for SMART routed symbols in 1.0.4 CHANGES FOR VERSION 1.0.4 fixed symbology used in Order, Status and Porfolio pages so now futures and currencies work nicely added optional TickSize parameter that defines minimum price fluctuation allowed for given symbol (expressed in pips, i. e. 0.0001). For stocks usually 100 (i. e. 0.01), for Forex: 1. automatic reconnect implemented - IBc now attempts to reconnect to IB every 5 seconds when case connection is lost or IB has crashed and was restarted Now works with quotFire OpenOrder on status changequot setting turned off as well as turned on. Order once marked with quotErrorquot status keeps last error message CHANGES FOR VERSION 1.0.3 compiled with TWS API 8.30 added GetPositionInfo method added unlock code dialog (File-gtEnter Unlock code). IBController by default does not transmit orders automatically. Transmission can be enabled by entering unlock code that is made available to the user after accepting the agreement. CHANGES FOR VERSION 1.0.2 IBC: Now pending order list features new status code quoterrorquot and new column: Last error IBC: New toolbar button: auto-cancel orders with errors - when turned on, all orders with errors are cancelled automatically IBC: Error messages now show order id and error code IBC: Repeating messages are now displayed once with appropriate repeat count and last update time IBC: Most recent error messages now appear on the top of the quotmessagequot list, so you dont need to scroll IBC: quotDuplicate order IDquot problem solved Now when TWS sends quotduplicate orderquot message, appropriate order line is marked in IB Controlled as quoterrorquot and such order ID is no longer used. When new ModifyOrder is placed then new order id will be assigned IBC: GetAccountValue function in IB interface CHANGES FOR VERSION 1.0.1 CancelOrder() removes quotNotYetTransmittedquot orders from the pending list IsConnected() funcition now returns integer values 0..3 (not bool) Clear Messages toolbar button added CHANGES FOR VERSION 1.0.0 HOW TO REPORT BUGS If you experience any problem with this beta version please send detailed description of the problem (especially the steps needed to reproduce it) to bugs at amibrokerThe Snake Trading System - Forex Strategies - Forex Resources - Forex Trading-free forex trading signals and FX Forecast 461 The Snake Trading System ALL INDICATORS REPAINT For each indicators, there are a max number of bars within the signal can be repainted, it depends on how many bars the signal is calculated. Se o seu calculado nas últimas 3 barras, o sinal por trás da quarta barra não pode repetir. Se o signail é calculado na última barra apenas, repetir a barra aberta atual apenas, e você pode trocar o sinal no fechamento da barra. Inadequadamente, eles são chamados de não repintar indicadores. A maioria dos indicadores que dá sinais para a EA (Auto-Trading sistemas, que só precisa sinais claros) funciona desta forma, mas esta não é necessariamente a melhor maneira de construir um indicador para um sistema de comércio discrtetional. Em um Discretional Trading Stystem repintura também é um problema. Você não pode ter sentimento com desaparecer setas, linhas e pontos Luckly, olho humano pode filtrar bons e maus sinais com bastante facilidade, usando outros indicadores de monitoramento diferentes paramenters. Às vezes, em um sistema negociando. É melhor deixar o sistema de negociação dar-lhe alguns sinais rápidos, além de outro indicador defasado, mais forte. Partilhe a sua opinião, pode ajudar a todos a compreender a estratégia forex.

No comments:

Post a Comment