@wafib : ) No problem.
Posts made by jstap
-
RE: Trade during specific times of the day?posted in Questions & Answers
@wafib Hi, on the left panel you have time filters, in there is time filter, place this above all blocks. You can set to required times or set a constant so you can change in EA settings, if you need more than 1 time zone just place more than 1 block but connect them separately.
-
ATR pipsposted in Tutorials by Users
Re: ATR value to Pips - Tutorial
Have just been looking at using ATR values for stop loss after using the above topic for information, I have worked out how to accomplish saving ATR pips into a variable for all broker symbols, the following link contains all but it is set up for a broker that has 5 zeros after the decimal for most forex pairs.
Hope people find this useful.
-
RE: DoubleMathRoundposted in General Discussions
@cdt Hi, In this link you will see how get functions into variables and ajust if needed.
Hope this helps.
-
RE: When the last three candles were above the 50 exponential moving average place a trade. How to do this?posted in Questions & Answers
@christhapiss Hi, l'androrra is correct and this is the traditional way but it prevents you having a choice in the number of candles, in the following link you will see how I use a loop to achieve this.
Hope this helps
-
RE: If custom codeposted in Questions & Answers
For anyone that is interested, while working on another project I found some of Miro's code for inserting different timeframes into a variable, a little bit of adjusting and it works perfectly for this project. link text
-
RE: If custom codeposted in Questions & Answers
@l-andorrà Hi, this EA se set up for all broker pip rules, the reason I am not using acc% vs stop loss is because it closes because of an indicator, nearly all losses happen long before SL is hit so % at risk is less than what would be in EA, I am using SL just for an emergency situation
-
RE: If custom codeposted in Questions & Answers
@q8carpenter Hi thank you for your time, in this link is where I first tried to have this work and it worked as expected, link text, when I entered it into my main project it wouldn't divide the balance to change the LOT according to balance, I have now learnt that saving balance into a variable allows the needed calculations. Unfortunately I deleted that part so I will have to start again, this was all to make EA automatically start with a predetermined lot for different symbols, custom code would have been the neater option but I will have to build with lots of blocks:)
-
RE: If custom codeposted in Questions & Answers
This is the code:
string Name = Symbol(), Test[] = { "EURUSD", "EURGBP", "USDJPY" };
double Result = 0, Value[] = { 15.0, 20.0, 25.0 };int Count = ArraySize( Test );
for( int i = 0; i < Count; i++ )
{
if( Name == Test[i] )
{
Result = Value[i];
break;
}
} -
RE: If custom codeposted in Questions & Answers

I have tried to implement this code which I think will full full all my needs but I am getting compilation errors (see picture), does anyone have any way I can get this code to compile?
Thanks
-
RE: How to EA draw an indicator on the chart automatic?posted in Questions & Answers
I could be wrong but, any indicators & chart settings I want to use with EA I save as template so I can add in a couple of clicks, there is a block called apply template which would probably do this for you, also this post link text may help.
-
If custom codeposted in Questions & Answers
Hopefully someone can help, my knowledge on mq4 code is limited, I am trying to wright nested if statements, what I am trying to do is:
if variable1=string1 then insert number into variable2, else if variable1=string2 insert a different number into variable2. This continues until match is found or value 0.0 is inserted into variable2.Thankyou
-
RE: Lines on high and low of rangeposted in Questions & Answers
@vonmunchy Think you for this but, when you change the start time to before 00:00 it stops working correctly.
-
RE: Lines on high and low of rangeposted in Questions & Answers
@vonmunchy No it repaints fine, it just often doesn't sit on the high and low.
-
RE: Lines on high and low of rangeposted in Questions & Answers
@vonmunchy Yes, I may use the logic in another EA but just lines at the moment, it is when the time starts at the end of one day and finishes the next that I seem to be struggling.
-
RE: Lines on high and low of rangeposted in Questions & Answers
@vonmunchy the high in a range and the low in the same range, the range is decided by a start and finish time, although candles could be used as there is always a set number in a range.
-
RE: Lines on high and low of rangeposted in Questions & Answers
I have made another version using a loop to find the candle ID but, like the others it is not correct. For some reason it works out the high candle ID as 1 or 8, it also works out the low candle ID as 1 or 8, they are never the same and each day the lines are drawn, the numbers may switch.
I doubt anyone knows why but any ideas on how to correct would be good.
-
RE: Lines on high and low of rangeposted in Questions & Answers
@vonmunchy No mate, looks like drawing lines over 00:00 time cant be done accurately.
-
RE: Buttonsposted in Questions & Answers
@helmud_h87 miro is not on here very often, if you click Piroozmand's link, then click the on tick tab all blocks are there to view.