I make it so, let say name EA is MyProject1 and for MT4
- Project - Import Project - MyProject1.mq4 file
- Rename this imported file (click on its name) and type MyProject2
now you have new version
I make it so, let say name EA is MyProject1 and for MT4

I made it manually into code 
instead of enum you can use numeric values like 0,1,15,... - depends on how they are used in code
https://ctrlv.cz/shots/2016/09/23/Sko1.png
https://ctrlv.cz/shots/2016/09/23/iSIQ.png
I can not explain it better 
If somebody meet same problem as I, he can read first post and find solution 
try block Trace for your buffers in indicator tester and you will see buffers behavior with values 
try restart your browser when this issue happens, try it in chrome browser, if you are using bool variables - after copying check blocks if relevant bool variable is placed, if you are copying blocks into "onTrade", check if they are not duplicated in "onChart"
these problems sometimes happen, sometimes not - often browser restart with page close/open is solution
bool variable once again, if you have some in blocks and you change name for this variable, check your blocks if relevant variable is placed correctly after this .. 8-)
this is what is No trade nearby making now, randomly opening in opposite side (batch opened trades - red lines not respected pips offset and not respected direction for winning and lossing side):
where is point of this randomly opened trades placed trade after trade (without respecting pips offset), you are sure this is not bug? 
it goes only for winning and lossing mode, mode both is OK, but these two ... need be checked 
is this right (expected) behavior for block No Trade Nearby? 
there are separate blocks for pending Buy and for pending Sell, you need to decide (or EA strategy conditions) which one to use ..
for pending Buy:
when is placed above current price and this price goes up and crosses this pending Buy, you get Buy stop
when is placed bellow current price, and this price goes down and crosses this pending Buy, you get Buy limit
for pending Sell:
when is placed above current price and this price goes up and crosses this pending Sell, you get Sell limit
when is placed bellow current price and this price goes down and crosses this pending Sell, you get Sell stop

for this complex formula you can use custom code block
atr and other values you can store into variables using Modify variable block
I am sure, with little efforts you create this well with fxdreema 
I think, for this you need create own counters and switch between them, you can count bars using block "Once Per Bar" and after this you can create own counter with variable, like variable: int myCount1=0
and after block Once per bar - add custom code block, with code: myCount1=myCount1+1; (or myCount++;)
now you can this variable compare with something else with condition block ...
and in certain time this counted variable null, lets say: myCount=0;
Here it is ...
I made easy EA and you can test it:
https://fxdreema.com/shared/5C9u5gPZc
some settings:
https://ctrlv.cz/Mxms
try 10p winning side:
https://ctrlv.cz/lYY3
did you see randomly open into losing side? something is not ok
now 10p into losing side:
https://ctrlv.cz/vIEB
did you see randomly open into wining side? something is not ok
now 10p into both sides:
https://ctrlv.cz/YOHi
here is all working ok
this randomly opening is because of missing logic after Case conditions as I typed above ....
how can I avoid this randomly opening? please again, check it ...

I am going provide you once again with more detailed way, why now is No trade nearby not working properly, more detailed pictures 
S>20 --> C= H-(3ATR)
Where:
S = Stochastic oscillator
C = trigger to close the position
H = highest close of previous 10 candles
A = Average True Range of candle H*
H - custom code block - here you fill some double variable, like: myHighest=iHighest(Symbol(),Period(),MODE_HIGH,10,1);
A - for this I have not understand what exactly you need, if ID from this candle - you can get it with custom block and function to write into variable like: myHighestID=iHigh(NULL,Period(),10); ... and after this you can use this known candle ID to compute ATR or whatever you need ... after this you can work with your formula and filled variables in custom block ...
maybe it goes with other ways, you must try it 
with this:
https://fxdreema.com/shared/6t5hn3Qte
you get this:
https://ctrlv.cz/aSAE
You want to use this, because you want each Buy trade to be created above all other Buy trades?
No, when "if" in "case" is true, it runs this variable: " {next = false;}"
{next = false;} - it means, that next condition (or whatever else) "is not executed"
if you add "(price <= OrderOpenPrice()) || ( ..." into case 1 and case 2 as I mentioned (or something else) - you stop this issue, it is issue in block ... check it please 
possible is:
but normally, your variable after MT4 restart is lost
I type it here in reports ...
block No trade nearby
in condition after case 1: and case 2: for side direction (opening in winning or losing side) must be some condition to deny opening trades when price is above/bellow order open price (depends on direction type and trade type), condition can be like:
(price <= OrderOpenPrice()) || ( ...
without this it results in opening trades one after another ... (not necessary opening trades, but true - orange output)
can you check it please? 
here is working example (conditions added manually in code for case 1: and case 2:):
{
if (use_current_price) {price = SymbolAsk(SYMBOL);}
switch (RangePosition)
{
case 0: if (price <= (OrderOpenPrice() + distance/2) && price >= (OrderOpenPrice() - distance/2)) {next = false;} break;
case 1: if ((price <= OrderOpenPrice()) || (price <= OrderOpenPrice() + distance && price >= OrderOpenPrice())) {next = false;} break;
case 2: if ((price >= OrderOpenPrice()) || (price <= OrderOpenPrice() && price >= OrderOpenPrice() - distance)) {next = false;} break;
}
}
else
{
if (use_current_price) {price = SymbolBid(SYMBOL);}
switch (RangePosition)
{
case 0: if (price <= (OrderOpenPrice() + distance/2) && price >= (OrderOpenPrice() - distance/2)) {next = false;} break;
case 1: if ((price >= OrderOpenPrice()) || (price <= OrderOpenPrice() && price >= OrderOpenPrice() - distance)) {next = false;} break;
case 2: if ((price <= OrderOpenPrice()) || (price <= OrderOpenPrice() + distance && price >= OrderOpenPrice())) {next = false;} break;
}
}
you can try add new condition for measuring distance this MA from SL price, lets say logic:
measuring_distance > my_value (if true - next block can pass)
where measuring_distance you can get as difference between MA price and SL price (dont forget, here can be negative result)
and my_value is compared value, maybe you can set it with conditions like pips or normal price fraction (0.0010 ...)

compare it with same indicator
or easy, when:
Open<Close (it is Bull candle)
Open>Close (it is Bear candle)
you need define your variable into Variables, let say: Variable1
after this you type into adjust field: +Variable1 (not with right click, but normal with keyboard)
but dont forget, your variable must have right value, like Variable1=0.0010 for 10pips, you can not define Variable1=10pips (I am no sure, but I think this way it is not working) ...
or if you will have variable in pips, lets say Variable1=10, than try type into adjust field this:
+(toDigits(Variable1,Symbol()))
not sure if all I typed is working, I have not testing it 