IN PROGRESS
Bids
9
Avg Bid (USD)
\$102
Project Budget (USD)
\$30 - \$250

Project Description:
MT5 expert advisor target profit and stop loss calculation will be converted to \$dollar amount (cash TP, SL) it currently calculates by pip amount.

Please note this is a multi-currency advisor that looks at the total Pip amount of 2 pairs. Let me know if you have any questions.

09/28/2013 at 9:59 ICT
Here is the calculate profit function for open orders;

int OrdersTotalProfit_Pips(int magic_number, string symbol_1, string symbol_2)
{
int profit = 0;
//----
for(int i=PositionsTotal()-1; i>=0; i--)
{
string symbol = PositionGetSymbol(i);
if(symbol == "")
{
Print("OrdersTotalProfit_Pips: error = " + ErrorDescription(GetLastError())); continue;

if(symbol!=symbol_1 && symbol!=symbol_2) continue;
//----
double order_point = SymbolInfoDouble(symbol, SYMBOL_POINT);
RefreshRates();
{
double bid = SymbolInfoDouble(symbol, SYMBOL_BID);
profit += (int)NormalizeDouble((bid - Position.PriceOpen()) / order_point, pips_digits);
}
else
{
profit += (int)NormalizeDouble((Position.PriceOpen() - ask) / order_point, pips_digits);

This is how EA close orders when target profit is reached in pips.

if(use_levels)
{
double gross_profit = OrdersTotalProfit_Pips(MagicNumber, Pair1, Pair2);
if(StopLoss > 0.0)
{
if(gross_profit <= main_sl)
{
Print("Closing by level S/L, gross profit = " + DoubleToString(gross_profit, pips_digits) + " pips");
CloseOrders(MagicNumber, Pair1, Pair2);
}
}
if(TakeProfit > 0.0)
{
if(gross_profit >= main_tp)
{
Print("Closing by level T/P, gross profit = " + DoubleToString(gross_profit, pips_digits) + " pips");
CloseOrders(MagicNumber, Pair1, Pair2);

Maximum 4 lines of code needs change here and \$50.00 + is definitely out of budget.

Thanks for bidding!

Skills required:
Project ID: 4972007
Report Project
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

\$ 79
in 3 days
\$ 45
in 3 days
\$ 154
in 3 days
\$ 166
in 2 days
\$ 88
in 3 days
\$ 30
in 1 days
\$ 83
in 1 days
\$ 144
in 3 days
\$ 222
in 5 days
\$ 54
in 3 days