指定
//+------------------------------------------------------------------+
//| Simple Moving Average Robot |
//+------------------------------------------------------------------+
#property strict
input int MA_Period = 50;
input double LotSize = 0.1;
double MA_Value;
//+------------------------------------------------------------------+
int OnInit()
{
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnTick()
{
MA_Value = iMA(Symbol(), PERIOD_CURRENT, MA_Period, 0, MODE_SMA, PRICE_CLOSE);
double price = SymbolInfoDouble(Symbol(), SYMBOL_BID);
// Check if there are open positions
if (PositionsTotal() == 0)
{
// BUY condition
if (price > MA_Value)
{
trade.Buy(LotSize, Symbol());
}
// SELL condition
if (price < MA_Value)
{
trade.Sell(LotSize, Symbol());
}
}
}
//+------------------------------------------------------------------+#include <Trade/Trade.mqh>
CTrade trade;
応答済み
1
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
仕事中
2
評価
プロジェクト
24
21%
仲裁
0
期限切れ
2
8%
暇
3
評価
プロジェクト
263
30%
仲裁
0
期限切れ
3
1%
暇
パブリッシュした人: 2 codes
4
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
5
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
6
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
類似した注文
Mk
30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot
プロジェクト情報
予算
1000 - 500000 USD
締め切り
最高 90 日
依頼者
出された注文1
裁定取引数0