HARPIA B3 (Brazil Bolsa Balcao) is a Scalper Expert Advisor.
Main Contracts: Mini Index and Mini Dollar - WIN and WDO.
HARPIA | B3 Settings
- MagicNumber: ID that must be changed if you want to install the Expert Advisor on different graphics, without interfering with each other, and behave as a single Expert Advisor.
- MaxSpreadByTickSize: 2 by default. Larger spreads are not recommended because of the strategy.
- LotsMode: you can choose between Fixed Lot or Automatic Lot.
- FixedLotSize: if chosed in Lots Mode the value "Fixed", you can put the lot size that you wish the EA open.
AutoLotRiskPercent: if chosed in Lots Mode the value "Automatic", the robot wil calculate the percentage of the balance that you accept to expose. Take the following formula into consideration before changing this number:
- Automatic Lot Size = ((Free Balance of Account * RiskPercent) / 100);
- MaxPositions: You can put how many trades in the same time you want to. For Netting Accounts, the value is 1; for Hedge Accounts, if the HandTurnSystem is active, the value can be higher or equal 4.
- Use Strategy_B: Choose between true or false to activate strategy B and operate more often.
- RenkoBoxSize: Size of the Renko box for EA decision making. Recommended 25 for WIN and 15 for WDO.
- BreakEvenProfit: to add minimum profit (in ticks) before triggering the Trailing Stop.
- Value can be 3;
- These setting can help you achieve minimum profit and pay B3 fees, charged per contract.
- BreakEvenDistance: to add the distance (in ticks) between the market price and the minimum profit. It's at 1.
- TrailingStopDistance: Distance between prices and StopLoss, when the profit is positive, the EA will drag the StopLoss to the distance defined in this parameter. 3 is the most recommended.
- VirtualStopLoss: Distance from StopLoss (virtual), in ticks. It works if one or more of the defense systems below is disabled, or the number of MaxPositions is insufficient to activate them (1, 2 or 3), even if the defense systems are enabled. It will be activated in cases where the EA is unable to activate the defense systems in time.
- DailyLossLimit: Daily loss limit, in ticks. It is at 90 ticks, by default. Upon reaching daily loss, the Expert will only start trading on the next trading day.
Hedging System by Tick Size
NOTE: This section works only for Hedge Accounts
- UseHandTurnSystem: Choose between true (on) or false (off), to work with the coverage system, instead of assuming Stop Loss.
- HandTurnStart : distance in Ticks to add a pending coverage order, contrary to the direction of the position sent. It is at 25 ticks, by default.
- UseFloatOrders: If activated (true), it works together with the HandTurnSystem which, instead of assuming the StopLoss of one of the two, activates two floating orders to walk close to the market price, in order to try to cancel the lock generated by HandTurn. Thus, he will close the group of these 4 positions when he reaches the group's positive balance. If not and if there is a balance for the day to close, it will close to avoid additional brokerage.
- OneWay: only one price direction at a time will be accompanied by the floating order, without moving the other direction.
- TwoWay: the two price directions will be accompanied by floating orders.
- FloatOrdersDistance: distance or range (in ticks) over which orders will track prices.
- FloatOrdersStopLoss: StopLoss for floating orders, in case there is a discount during the defense strategy.
- BeginHour and BeginMinute: Hour and Minute for the EA to start working.
- EndHour and EndMinute: Hour and Minute for the EA to stop working.
- CloseAllAtEndOfDay: If the value True is set, after trading hours, orders will be closed.
- Best Contracts: WIN and WDO. Drag the robot to a WIN $ or WDO $ chart, so that it opens the chart in the current contract.
- TimeFrame: All.
- VPS recommended.
- Hedge account is recommended.
- Initial Deposit: R$ 1000.00.
Improvement of the UseFloatOrders function, to work in sync with the Renko filter;
Filter for distance between positions and orders, according to the size in RenkoBoxSize;
Support and Resistance filter added;
Defense strategy added in conjunction with the existing HandTurnSystem: FloatOrders;
Adaptation of FloatOrders for TrailingStop to close group of positions when reaching positive group balance;
Search for Daily Profit adapted to native MT5, without using MT4 libraries for MT5;
Correction of OnTradeTransaction functions;
Bug fix in MaxPositions;
Bug fix in VirtualStopLoss;
Virtual Take Profit;
Break Even for Stop Gain added, to be compatible with the Stop Loss values.
Macro and Micro trend filter adjustment for all strategies;
Modification from NettingStopLoss to VirtualStopLoss. Works for Netting and Hedging accounts;
Hedging System modified for optional choice, if activated, will replace VirtualStopLoss, and trigger pending orders against;
Revision of the graph's aesthetic code;
Addition of Advanced Macro and Micro Trend Filter;
Reverse virtual takeProfit adjusted from 2/3 to 1/4 of the profit achieved.
Change from Local Time to Server Time;
Treatment against accidental duplication of pending orders;
StopLoss Skipping treatment;
Exclusion of the UseFloatOrder function, aiming at preventing losses;
Fixed error when changing contract.
Floating pending orders and market orders with added filters, to avoid repetition of orders over the same price already executed;
Control of counting the number of orders and positions executed in the queue added to the number of new orders that will enter, so as not to exceed the MaxPositions limit;
Filtering to avoid operations in very sudden price changes;
Push notification to notify when the account is out of margin for hedge orders;
Improvement of the pending orders exclusion function;
Improvement of the position closing function when reaching the maximum daily loss.
BreakEvenDistance: distance from the market price and the minimum profit;
Improved TrailingStop for better response rate;
Virtual TakeProfit added to guarantee 2/3 of the profit that is beyond the guaranteed TrailingStop;
DailyLossLimit to limit daily loss, in ticks;
Pending order shipping added;
UsePreHedging added for the Expert to place a pre-coverage order in the middle, before reaching the coverage order (Hedging Distance);
UseFloatOrder inserts a pending order that fluctuates along with the price, to take advantage of any opposite movements before starting to trigger the pre-coverage and coverage orders;
Revision of the Chart Event to automatically select the current month and year asset, for WIN and WDO;
Support review for Netting accounts;
Limitation review for the number of orders and simultaneous positions in the queue;
Added event to optimize memory consumption and system processing;
Closing of open positions at the end of the day, on the contract expiration day;
Hedge function to add new positions instead of expired ones, the next day, if the CloseAllAtEndOfDay option is disabled;
Closing of simultaneous hedging positions when reaching a certain profit;
Price filter added to avoid reversal zones;
Review of margin calculation before sending orders;
Review of stop loss modification and pending price, before making the changes;
Exclusion of pending orders placed when the main position reaches its target;
Double improvement of the function of closing positions with coverage, calculating the last registered balance and the daily balance.
Stop Loss, for Netting Accounts.
If MaxPositions is 1: EA will operate like a Netting Account (even in Hedge Account)
If MaxPositions above 1: EA will operate like a Hedge Account (only in Hedge Account)
On hit the Stop Loss value (in Positions Settings By Tick Size), the EA will calculate how many profits it made before close the negative positions.
- Bug fixes with brokers.
-Improvement of the Trailing Stop;
-Option to close orders at the end of the trading session.
Very Important! Before you trade with them, please change the ContractMode to respective contract.
Other Contract: Type the contract that you want to trade with another contract. But it at your risk!
Fixed Lot changed to LotsMode: Fixed or Automatic
Positions Distance: ticks distance to give space between positions, to avoid send positions repeated.
Positions Settings By Tick Size: All settings were improved to work generical with ticks, not as points, in contracts with different price units.
Use Take Profit: Optional Take Profit function added.