Trabalho concluído
Tempo de execução 2 dias
Comentário do cliente
Cannot Complain Very happy. Went above and beyond for me.
Will hire again if needed.
Comentário do desenvolvedor
Thank you for the order, my Friend. 5-star customer.
Termos de Referência
I need a dynamic lot size for my expert advisor with 3 input options:
1. fixed lot size (0.01)
if my account balance is $100,000 & I want to risk 0.01 lots per trade
2. Volume based on money ($1000) Example:
if my account balance is $100,000 & I want to risk $1000 of my account per trade (0.01 volume)
3. volume based on account percent (1%) Example:
if my account balance is $100,000 & I want to risk 1% of my account per trade (0.01 volume)
Most of the code has already been done, it just doesn't do what i want it to...
Heres The Code:
input group "General Settings" // General Setting Input Grouping
enum LOT_MODE_ENUM{ // Options
LOT_MODE_FIXED, // Fixed Lots
LOT_MODE_MONEY, // Lots Based On Money
LOT_MODE_PCT_ACCOUNT // Lots Based On % Of Account
};
input LOT_MODE_ENUM LotMode = LOT_MODE_FIXED; // Lot Mode Option
input double FixedLots = 0.01; // Lots
input double Money = 1000; // Money
input double PercentOfAccount = 5; // Percent
input double AccountBalance = 100000; // your account balance
-------------------------Functions-------------------------------
// Calculate Lots
bool CalculateLots(double slDistance, double &lots){
lots = 0.0;
if(LotMode==LOT_MODE_FIXED){
lots = FixedLots;
}
else{
double tickSize = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
double tickValue = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE);
double volumeStep = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
double riskMoney = LotMode==LOT_MODE_MONEY ? Money : AccountInfoDouble(ACCOUNT_BALANCE) * PercentOfAccount * 0.01;
double moneyVolumeStep = (slDistance / tickSize) * tickValue * volumeStep;
lots = MathFloor(riskMoney/moneyVolumeStep) * volumeStep;
}
// Check Calculated lots
if(!CheckLots(lots)){return false;}
return true;
}
// Check Lots For Min, Max And Step
bool CheckLots(double &lots){
double min = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);
double max = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX);
double step = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
if(lots<min){
Print("Lot Size Will Be Set To The Minimum Allowable Volume");
lots = min;
return true;
}
if(lots>max){
lots = max;
Print("Lot Size Will Be Set To The Maximum Allowable Volume");
return false;
}
lots = (int)MathFloor(lots/step) * step;
return true;
}
// Calculate Lots - Paste in between "calc sl & tp" & "Open buy positions"
double lots;
if(!CalculateLots(lastTick.bid-sl,lots)){return;}
// Calculate Lots - Paste in between "calc sl & tp" & "Open sell positions"
double lots;
if(!CalculateLots(sl-lastTick.ask,lots)){return;}
Respondido
1
Classificação
Projetos
313
28%
Arbitragem
33
27%
/
64%
Expirado
10
3%
Trabalhando
2
Classificação
Projetos
122
30%
Arbitragem
6
33%
/
33%
Expirado
5
4%
Trabalhando
3
Classificação
Projetos
87
29%
Arbitragem
24
13%
/
58%
Expirado
7
8%
Trabalhando
4
Classificação
Projetos
28
36%
Arbitragem
7
14%
/
71%
Expirado
2
7%
Livre
Pedidos semelhantes
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I have an existing MT5 Expert Advisor (“E-Core”). I need an experienced MQL5 developer to integrate a structured risk management upgrade and a higher timeframe trend filter into the current code. Two files will be provided: 1️⃣ E-Core Source Code (Current Version) 2️⃣ Update Instructions File (contains exact inputs, functions, and logic to integrate) The developer must: Integrate the update logic
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow
30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
I am looking for a highly experienced Pine Script v5 developer to build a professional, non repaint price action indicator for TradingView. or a ready made one so i can purchase. This is a structured two phase project. The goal is to create a clean, intelligent price action tool that works for both fast intraday trading and swing trading. Only apply if you have strong Pine experience and understand liquidity
Hello, I’m looking for an experienced MQL4/MQL5 developer to work with me on an ongoing basis. My clients request services such as: Converting TradingView Pine Script indicators/strategies into MT4 or MT5 Expert Advisors Converting MT4 EAs to MT5 (and MT5 to MT4) Compiling and fixing existing MQL4 / MQL5 EA code Adding simple features like alerts, SL/TP, lot size, and basic money management This job is for
I am looking someone to create an EA based on my MACD Histo indicator / strategy from Pinescript. I will send it to you for you to replicate. The EA shall have: - Divergence length in bars, min and max values. - Pivot Logic - Entry on close of divergence confirmation bar. - Dynamic lot size dependent on SL/TP, in monetary value. - SL / TP in percent away from entry, separate values for long and short. - Time, day and
Hello, I have a breakout EA with reversal logic. I own the full source code for both MT4 and MT5 versions. I need the modifications implemented for both MT4 and MT5 versions. I need several modifications: – Multiple reversals with configurable parameters – Breakeven functionality – Entry only after candle close beyond range + offset – Time-based activation – Alternative offset calculation logic – Automatic close at
simple automated trading system with adaptive risk management and trend-based execution. The EA manages trades with dynamic position handling and built-in stability filters. Designed for single-position trading and disciplined execution 30 usd budget
Informações sobre o projeto
Orçamento
30+ USD
Prazo
de 1 para 7 dias