명시
*Strategy:*
- Buy when the 50-day moving average crosses above the 200-day moving average
- Sell when the 50-day moving average crosses below the 200-day moving average
*Code:*
```
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
int OnInit()
{
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Script deinit function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
ObjectDelete(_MA50);
ObjectDelete(_MA200);
}
//+------------------------------------------------------------------+
//| Script tick function |
//+------------------------------------------------------------------+
void OnTick()
{
double ma50 = iMA(Symbol(), PERIOD_CURRENT, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double ma200 = iMA(Symbol(), PERIOD_CURRENT, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
if (ma50 > ma200 && OrderSend(_Symbol, OP_BUY, 0.1, Ask, 3, Bid-20*Point, Bid+20*Point, "MyOrder", 0, 0, Green) == ORDER_RETCODE_DONE)
{
Comment("Buy order executed");
}
else if (ma50 < ma200 && OrderSend(_Symbol, OP_SELL, 0.1, Bid, 3, Ask-20*Point, Ask+20*Point, "MyOrder", 0, 0, Red) == ORDER_RETCODE_DONE)
{
Comment("Sell order executed");
}
}
//+------------------------------------------------------------------+
//| Script deinit function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
ObjectDelete(_MA50);
ObjectDelete(_MA200);
}
```
This code creates a simple moving average crossover strategy, buying when the 50-day MA crosses above the 200-day MA and selling when it crosses below.
응답함
1
등급
프로젝트
3
0%
중재
0
기한 초과
0
무료
2
등급
프로젝트
16
13%
중재
1
0%
/
100%
기한 초과
0
작업중
3
등급
프로젝트
53
36%
중재
4
25%
/
50%
기한 초과
6
11%
로드됨
4
등급
프로젝트
155
69%
중재
4
100%
/
0%
기한 초과
1
1%
작업중
5
등급
프로젝트
3000
65%
중재
76
47%
/
14%
기한 초과
340
11%
무료
6
등급
프로젝트
1
0%
중재
1
0%
/
0%
기한 초과
0
작업중
7
등급
프로젝트
73
44%
중재
21
14%
/
67%
기한 초과
8
11%
무료
8
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
9
등급
프로젝트
1420
62%
중재
21
57%
/
10%
기한 초과
43
3%
무료
10
등급
프로젝트
43
30%
중재
2
0%
/
0%
기한 초과
0
로드됨
11
등급
프로젝트
925
48%
중재
301
59%
/
25%
기한 초과
123
13%
로드됨
비슷한 주문
I need someone to help me convert my tradingview pinescript to mt4, I only got $20 for this and I am gonna be giving you more works ahead, Also I will be paying with cryptocurrency cause my PayPal os not working here, Don't know why
WebRequest Kill Switch
75 - 100 USD
Project name: Webrequest Kill Switch Aim: The end user will have the ability to close all open trades or toggle the autotrading button from an external url Platform: MT4 Summary: There are two sub projects within this project: (i) Creation of a web form on an external url (ii) Expert advisor script which calls the Webrequest function to interact with (i)
I need someone to help me convert my tradingview pinescript to mt4, my budget for this project is $20 and I need this done fast in two days, Also, I am going to need you to be able to build a new indicator because that's the nest project, But I need to know if you can do this first , Thank you
I need you to convert my tradingview pinescript to mt4, I have just $10 for it now, But i am going to give you more work later on cause i still have more work i am going to need you to work on for me, and i will be paying with crypto, Thank You
Hello, I am in need of an expert to help me convert my tradingview pinescript to mt4, I will attach the file, But for now, I only got $15 for this project and the only payment method I can use right now is crypto, I will send it to you through crypto, Also I need someone that is ready to work because I still have lot of projects I will need him to do for me
Robots in C++ (cAlgo trading platform)
300 - 5000 USD
I'm new to this trading system wishing to get something that will guide me through the process of creating a new lifestyle. So I wish to grow my pockets in any circumstance coz life thing ain't easy any more
I need an expert in the development of a fully automated trading robot For MetaTrader. The Trading Robot must be "Web based" so it can be accessed or used through a website, You can view a screenshot here; https://www.awesomescreenshot.com/image/48030918?key=79b0ff91455d862746e9b649341f4cdb Why do i need? Simple Enough, This is what i need from my Trading Robot EA. The Trading Robot can only be accessed through a
Hello I'm in possesion of a straightforward MT% Expert AdvisorThat I want to convert into DXTrade. Are you able to do this conversion? Kindly let me know if the fil atached will be enough
I want to develop my ctrader bot
150+ USD
Hello, I need a quote for developing a bot for my renko based trading system on ctrader platform and based on the attached specification your expertise is highly needed for this project Thanks
I need a professional and expert developer for Machine Learning Solution for Custom Signal Analysis and Prediction
100 - 300 USD
I am seeking a skilled programmer to develop a comprehensive machine learning solution for analyzing custom signals and predicting security prices within specified timeframes. The solution will incorporate various machine learning stacks to test a range of custom signals and determine their correlation to security prices. I will need the applicant to implement this features and other features will be shared in the
프로젝트 정보
예산
50+ USD
기한
에서 1 로 4 일
고객
넣은 주문1
중재 수0