@charlie-4 under a purple block place delete pending order block
Posts made by jstap
-
RE: Create an opposite Buy Stop when a previous Sell Stop enters a trade (not when it resolves).posted in Questions & Answers
-
RE: Pips per second/minute/hourposted in Questions & Answers
@wezil In this link is a way of getting the 1min candle open price for a chosen time, on back test will only work on 1min TF but should work on any in demo or live.
Using this method 1min is the smallest gap you can work with.
hope this helps
-
RE: Create an opposite Buy Stop when a previous Sell Stop enters a trade (not when it resolves).posted in Questions & Answers
@charlie-4 No worries, took me a long time to work that one out.
-
RE: ema 50 cross below ema 200posted in Questions & Answers
@jsauter86 There is different ways to work out a cross, but I find using a loop allows you to check number of candles and change if required, giving another confirmation to weather the trade is worth taking, as for being specific to me that is one of the must have's when building an EA.
-
RE: ema 50 cross below ema 200posted in Questions & Answers
In this link you will find how to create a loop, at the point of ma's crossing it will start to count candles, this will give you a good start on what you are trying to achieve.
link text -
RE: Create an opposite Buy Stop when a previous Sell Stop enters a trade (not when it resolves).posted in Questions & Answers
It's called trade created, you need to have created a trade on the on tick tab, then look at the purple blocks on the on tick tab.
-
RE: Create an opposite Buy Stop when a previous Sell Stop enters a trade (not when it resolves).posted in Questions & Answers
Go on the on trade tab, in there place a purple trade created block with tree underneath, then place a purple trade closed block with tree needed underneath, hope this helps.
-
RE: how to open new buy and sell when one trade hit stoplossposted in Questions & Answers
@iqbalazmi When I do this I use a purple trade closed block on the on trade tab. Hope this helps
-
RE: ATR pipsposted in Tutorials by Users
@l-andorrà No problem, this picture shows the missing line for the 4th digit.

-
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