ADX problems

스크립트 다른

작업 종료됨

실행 시간 14 시간
고객의 피드백
Eric is a great programmer and he helps you to understand code after his work.
피고용인의 피드백
Great customer, look forward to working with again.

명시

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);

응답함

1
개발자 1
등급
(273)
프로젝트
396
63%
중재
70
53% / 26%
기한 초과
198
50%
무료
비슷한 주문
I'm looking for an experienced Pine Script developer to help fix, enhance, and finalize a strategy converted from TradeStation EasyLanguage into Pine Script v5 for TradingView. The current script (pivot trend system) has been partially converted using AI but still contains errors and lacks full signal plotting and strategy functionality. The job involves: 1. Debugging and cleaning the existing Pine Script code 2
Project Description: I need a complete integration for an investment platform on an existing WordPress site (Astra theme). The solution must: 1. Capture lead data from WordPress forms into Zoho CRM (investment stages, payments). 2. Provide a client login portal with real-time portfolio tracking (stages, slots, profits). 3. Automate investment workflows based on fixed amounts (€10,000/slot) and stages: - 10%
Hello, G ood morning. I'm looking for a programmer that can create an EA for me in fxdreema for MT4 and MT5 based on a candlestick pattern that I use at certain points in the market. do I have to send you the file with the EA rules? Kindly bid if this is what you can do. Thanks
i have For Codes separately and i would like to merge it into a single code. First i would like to know if that is possible. ill attach an image of how it looks like all together
I want to pull certain data, including swaps and spreads, from multiple brokers into a single database. I want the process set up so that it is ultimately automated and needs no interference from me
We are looking for a developer to implement a fully automated stock trading strategy in PowerLanguage for MultiCharts 64-bit , including Portfolio Trader support. Please see the attached PDF specification for complete details. Key requirements: Works with Portfolio Trader across multiple assets Entry based on Donchian breakout , Williams %R , and EMA trend Exit via various stop types (ATR, EMA trail, etc.) Optional
Project Overview I am looking for an experienced MQL5 developer to create a highly profitable Expert Advisor (EA) for MetaTrader 5 with exceptional win rate performance. Key Requirements Performance Targets: Minimum 75-80% winning ratio (Must achieve) 10-12 trades per day execution 7-9 winning trades out of daily total Consistent profitability over long term Technical Specifications: Platform: MetaTrader 5 (MT5)
Hi , Been working on a trading strategy for ninja trader 8 it’s pretty close but needs some fine tuning. I have been working with a non trader coder by mistake and it’s been a challenge
I need help listing all the studies from a chart. * I’m trying to build a scoring engine and show the score as a text message right on the chart, so I don’t have to keep checking multiple charts. Another project I’m working on—I’ve subscribed to OrderFlowLabs indicators and want to use Python to build better scoring logic. I started working on it using Claude.ai Max, but I got a bit distracted. Now, i need to
I have a full trading strategy i want to develop to ctrader cbot, also have many projects that i want to get done. So need a life time developer that can work with me forever

프로젝트 정보

예산
10 USD
개발자에게
9 - 9 USD
기한
 1 일