Forum

iWPR Reference Points

Hi all, just after a bit of clarity on the use of iWPR. When using the iRSI function it has four parameters, with the last being ENUM_APPLIED_PRICE, so if for example I use PERIOD_M15 and set the final parameter to PRICE_CLOSE, create an array and then reference it, i.e rsiVAL[2], I am getting the

Setting Trading Days

Hi all, I'd like to test my trading strategy on different days of the week. I've 'followed' the instructions here but I don't seem to understand how to use the functions it suggests. Below is my code; #include <Trade/Trade.mqh> CTrade trade; CPositionInfo myposition; input double cLot= 25 ; input

Indicators with different time/period to the chart, in EA's

Hi all, Below is the (working) code to open a buy order if the close price of the previous bar is above the 20 moving average . However, i use M15 charts but want the moving average to be calculated on the D1 chart/time frame. How do i go about this? TIA #include <Trade/Trade.mqh> CTrade trade;

Setting Trading Times

Hi all, a week into coding in MQL5 and struggling with setting trading times. For this particular strategy i only want it trading the US open, so need it to start at 9:30am local time, and finish at 9:45am (i prefer using local time as i am in a different time zone so don't want to have to account