ADX problems

Sripts Lo demás

Trabajo finalizado

Plazo de ejecución 14 horas
Comentario del Cliente
Eric is a great programmer and he helps you to understand code after his work.
Comentario del Ejecutor
Great customer, look forward to working with again.

Tarea técnica

Hi! I have problems with me code. I need somebody help me with that. Thank you

extern double lots = 1;           
extern double CCIsell = 100;
extern double CCIbuy = -100;
extern double CCIclose = 100;
extern double slippage = 0;
extern int CCIperiod = 14;
extern double ADXlimit = 25;
extern int ADX = 14;
extern string nameEA = "B3";
int c, ticket;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
  
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
//Variables Initialization//
int positions = 0;  
//Scanning//
for(c = 0; c < OrdersTotal(); c++)
   {       
//Checking open market trades//
    OrderSelect(c, SELECT_BY_POS);
//Looking only for this symbol and orders from this EA//       
      if(OrderSymbol() == Symbol() && OrderType() <= OP_SELL && OrderComment() == nameEA)
        {  
         positions++;
//Checking for close signal for bought trade//
         if(OrderType() == OP_BUY)            
           {
           if(iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) >= CCIclose)
             {
              //Close bought trade//
              OrderClose(OrderTicket(), OrderLots(), Bid, slippage, CLR_NONE);  
             } 
           }   
//Checking for close signal for sold trade//
         else
           {
           if(iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) <= -CCIclose)
             {
             //Close sold trade//
              OrderClose(OrderTicket(), OrderLots(), Ask, slippage, CLR_NONE);
             }
           }
        }
   }
//If there is no open trade for this pair and this EA//
if(positions < 1)
   {  
      if(AccountFreeMargin() < 1000*lots)
         {
           Print("Not enough money to trade ", lots, " lots. Strategy:", nameEA);
           return(0);
         }
     
   //Checking buy signal//
      if(iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) <= CCIbuy)
         { 
              if( (iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) < iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 1)) &&
              ( (iADX(NULL, 0, ADX, PRICE_OPEN, MODE_MAIN, 0) >= ADXlimit) || (iADX(NULL, 0, ADX, PRICE_OPEN, MODE_MINUSDI, 0) >= ADXlimit)))
                 
                 //Sell//
                 ticket = OrderSend(Symbol(), OP_SELL, lots, Bid, slippage, 0, 0, nameEA, 0, 0, CLR_NONE);
               
              else
                
                 //Buy//
                 ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, slippage, 0, 0, nameEA, 0, 0, CLR_NONE); 
               
              if(ticket < 0)
              Print("OrderSend(",nameEA,") ERROR #", GetLastError());
               
                                 
         }
      
      //Checking sell signal//
      if(iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) >= CCIsell)
         {
              if( (iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 0) > iCCI(NULL, 0, CCIperiod, PRICE_OPEN, 1)) &&
              ( (iADX(NULL, 0, ADX, PRICE_OPEN, MODE_MAIN, 0) >= ADXlimit) || (iADX(NULL, 0, ADX, PRICE_OPEN, MODE_PLUSDI, 0) >= ADXlimit)))
                               
                //Buy//
                ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, slippage, 0, 0, nameEA, 0, 0, CLR_NONE); 
                
            else       
                //Sell//
                ticket = OrderSend(Symbol(), OP_SELL, lots, Bid, slippage, 0, 0, nameEA, 0, 0, CLR_NONE); 
                   
              if(ticket < 0)
               Print("OrderSend(",nameEA,") ERROR #", GetLastError()); 
                    
         }
           
   }   
   return(0);

Han respondido

1
Desarrollador 1
Evaluación
(273)
Proyectos
395
63%
Arbitraje
70
53% / 26%
Caducado
198
50%
Libre
Solicitudes similares
I’m looking for someone experienced with Think or Swim to create a backtesting script for an in-the-money Iron Condor strategy using options on the SPX. The strategy involves setting up 10 contracts of an Iron Condor with a 10-point spread width and a net credit requirement of $11 per contract. The goal is to backtest the performance over the last three years, focusing on trades where the SPX closes outside a
Hello there, i need an expert forex developer who is well versed with GALLIEO FX. I purchased a trading bot from this company and due to some reasons I haven't been able to test and run the program properly so I need an expert who can help me to fine tune the bot for me so that bot can provide excellent results. Thank You
HELLO EVERYONE I NEED SOMEONE TO SELL ME A NON REPAINTING BOOM AND CRASH INDICATOR... A NON REPAINTING PLEASE TO TAKE LONG TRENDS AND FOR CATCHING SPIKES.... A FUNCTIONING INDICATOR PLEASE
Hello great developer i need a developer that can work on a Tradorvate trade copier i want to create tradorvate trade copier I will be available for to answer any questions Thanks Peace be unto you
Hey, I’m needing someone to add statistics to an indicator in Trading View. I already have the indicator coded on Pinescript which is a Zig Zag Indicator, however I need someone to calculate statistics of the Zig Zag over a regular hour trading session including the mean, mode, deviation, etc.. with labels of those statistics in the indicator, I will provide all of the math and details, and a picture of how it should
Hello there, how are you doing? Is there anyone that Can you help me with Ninja Trader 8 strategy for crypto? I urgently need an experienced ninjatrader 8 developer for this project. Thanks
Hi, I need a professional in this field. I have a cbot using two free indicators available on ctrader platform. The specification is attached. Please can you provide your quote for completing this cbot? Thanks
Hello, How are you doing? Firstly, I would like to develop a strategy with an indicator that I tinkered with on tradingview and which is in pine script version 2... Or just have the indicator properly converted to version 5. The ultimate goal being to convert the indicator and the strategy to C# for NT8 provided that the tests carried out under TradingView with the script in version 5 are conclusive. It actually
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
I am writing to inquire about the possibility of porting a simple project from MQL5 to Quantower using C#. The project in question includes a panel with a button that draws a rectangle on the chart. This rectangle can be freely dragged around the chart area. Additionally, the panel contains two editable fields, X and Y, which display the position of the rectangle. As the rectangle is dragged across the chart, the X

Información sobre el proyecto

Presupuesto
10 USD
Para el ejecutor
9 - 9 USD
Plazo límite de ejecución
a 1 día(s)