
Abordamos o tema de automatização de estratégias em NTSL, MQL5 e NinjaScript!
//// Gostaria de atuar somente na venda se a compra foi stopada e vice versa. input stop(40); alvo(40); begin se(not IsSold) e (not IsBought) então inicio se(fechamento>abertura) então inicio BuyAtMarket; end; se(fechamento<abertura) então inicio SellShortAtMarket; end; end; se(IsBought) então inicio SellToCoverLimit(BuyPrice+alvo); SellToCoverStop(BuyPrice-alvo); end; se(IsSold) então inicio BuyToCoverLimit(SellPrice-alvo); BuyToCoverStop(SellPrice+alvo); end; end;