Forum

Help with calling a custom indicator within EA

Hi All I am attaching a custom indicator I downloaded from Article section. I tried connecting to the indicator from OnTick() function within my EA. But it is displaying 0 values. The indicator has 6 values for Stop Line, Start Line and for Target Lines from 1 to 4. You can find this in Price[0] to

Help with position open and close

Hi All I am trying to open a position when there is no existing position for the symbol. If there is an existing position then i'll close that position before opening a new position. I came up with the below code snippet but it's putting 100's of trades for every few seconds when my chart itself was

DateTime to Time

Hi I want to get time portion out of datetime.. please help ie, 2017.0.15 15:30:00 to just 15:30 The idea is to close trades after 15:30. Please let me know how to achieve this. Thanks

code help for opening and closing position OnTick - MT5

Hi All If someone could help me achieve the below it would be great; In Ontick() I have some indicators, 1. when indicators generate Open Signal I want to book a trade and create a position 2. When indicators generate Close Signal I want to close position. Please help

iStochastic Indicator Coding Advice

Hi All I am new to MQL and I am trying to replicate the code I used to have for Full Stochastic in MT4. Code I used to have for Full stochastic works as this, Step 1. Fast Stochastic is given as input to the stochastic function (For e.g say 14, and the output is stored in variable say K) Step 2