An EA that uses several timeframes

MQL5 エキスパート 相談

仕事が完了した

実行時間2 日
依頼者からのフィードバック
great codes great attitude
開発者からのフィードバック
great customer. thank you

指定

I have created an EA with several timeframes, however, when tested, bugs are encountered, please advise.

I am using a H4 timeframe when going through a test.

input int      barNumM=42;             // Number of bars in mid term array
double   SLS=0;


MqlRates mrateS[];
MqlRates mrateM[];

if(CopyRates(_Symbol,PERIOD_H4,0,barNumS,mrateS)<0)
{
Alert("Error copying H4 rates/history data - error:",GetLastError(),"!");
return;
}
if(CopyRates(_Symbol,PERIOD_D1,0,barNumM,mrateM)<0)
{
Alert("Error copying D1 rates/history data - error:",GetLastError(),"!");
return;
}

SLS=mrateM[iHighest(_Symbol,PERIOD_D1,MODE_HIGH,barNumM,0)].high-mrateM[iLowest(_Symbol,PERIOD_D1,MODE_LOW,barNumM,0)].low;

Bug: mrateM[iHighest(_Symbol,PERIOD_D1,MODE_HIGH,barNumM,0)].high-mrateM[iLowest(_Symbol,PERIOD_D1,MODE_LOW,barNumM,0)].low returns negative values sometimes.

Some of my buy logic is not working properly as well, but I think that is related to mrateM not functioning properly.

応答済み

1
開発者 1
評価
(94)
プロジェクト
190
66%
仲裁
8
25% / 50%
期限切れ
2
1%
2
開発者 2
評価
(74)
プロジェクト
121
43%
仲裁
12
33% / 50%
期限切れ
17
14%
3
開発者 3
評価
(1)
プロジェクト
0
0%
仲裁
0
期限切れ
0
4
開発者 4
評価
(15)
プロジェクト
16
19%
仲裁
2
0% / 50%
期限切れ
1
6%
類似した注文
The basic indicator and the only indicator to be used is PRICE PERCENT RANGE and the indicator files are attached. A picture to visualize what is required is also attached. Job: Indicator : 1. Add Buy alert and Buy arrow function,if the price%R value touches or goes below value 9.5 or the user specified,after candle close. 2. Add Sell alert and Sell arrow function,if the price%R value touches or goes below value 90.5

プロジェクト情報

予算
30+ USD
開発者用
27 USD
締め切り
最高 1 日