![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am new in this forume but I Realy need your kind asistance in writing a simple sintence of MQL code.
I need to write a code that will give me the 30 minute chart high, low, and close inorder to use them in the devlopment of my new tarding system.
Looking forward to hear from any one of you
what i realy need is to get them inside a certain code. as i need to use them in the trading system to calculate the pivot points and support and resistance points. So i can use them as my enrtry point, the SL and TP.
So can you help me doing this
Let me Explain what is my tarding system is all about
actually my trading system is a simple voting system.
this tarding system is using 9 diffrant technical indicators studying the fx market price moves from diffrant aspects.
by comparing the current period indicator value and the previous period value.
If current period indicator value > the previous period value so the direction is to buy on this market instrument and vis versa for the sell position.
then gather the total 9 recommendation for the differat 9 indecators into a voting process to determine the market direction.
Hope this will give you a clue about what I am realy doing
Hi All
Here is the code I had writen till now, I wish you try it and to recive your feedback.
var: MacdCurrent(0),MacdPrevious(0),SignalCurrent(0),Si
gnalPrevious(0);
var: fmacdcurrent(0),fmacdprevious(0),fsignalcurrent(0)
,fsignalprevious(0);
var: rsicurrent(0),rsiprevious(0),stocurrent(0),stoprev
ious(0),sstocurrent(0);
var: sstoprevious(0),momcurrent(0),momprevious(0),mficu
rrent(0),mfiprevious(0);
var: cnt(0);
MacdCurrent =iMACD(12,26,9,MODE_MAIN,0);
MacdPrevious =iMACD(12,26,9,MODE_MAIN,1);
SignalCurrent =iMACD(12,26,9,MODE_SIGNAL,0);
SignalPrevious =iMACD(12,26,9,MODE_SIGNAL,1);
fmacdcurrent =iMACD(6,13,3,0,MODE_MAIN);
fmacdprevious =iMACD(6,13,3,1,MODE_MAIN);
fsignalcurrent =iMACD(6,13,3,0,MODE_SIGNAL);
fsignalprevious=iMACD(6,13,3,1,MODE_MAIN);
rsicurrent =irsi (14,0);
rsiprevious =irsi (14,1);
stocurrent =isto (8,3,6,MODE_SMA,MODE_MAIN,0);
stoprevious =isto (8,3,6,MODE_SMA,MODE_MAIN,1);
sstocurrent =isto (8,3,6,MODE_SMA,MODE_SIGNAL,0);
sstoprevious =isto (8,3,6,MODE_SMA,MODE_SIGNAL,1);
momcurrent =imom (14,0);
momprevious =imom (14,1);
mficurrent =imfi (14,0);
mfiprevious =imfi (14,1);
If MacdCurrent fmacdcurrent rsicurrent sstocurrent mficurrent {
SetOrder(OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,RED);
Exit;
};
If MacdCurrent>MacdPrevious and SignalCurrent>SignalPrevious and
fmacdcurrent>fmacdprevious and fsignalcurrent>fsignalprevious and
rsicurrent>rsiprevious and stocurrent>stoprevious and
sstocurrent>sstoprevious and momcurrent>momprevious and
mficurrent>mfiprevious then
{
SetOrder(OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,
RED);
Exit;
};
Best of Luck