- i didnt check your logic in detail, i just saw that this hardly will work and made for you a solution that works
- up counter is the number of bars that close above the ma and dn counter vice versa (this way you just have to loop once for the upper and lower close)
- in your Problem you didnt mention anyhting about buy or sell, however making such things isnt tricky at all and the forum has plenty of posts regarding this issue. If there are any advanced tasks surrounding buy and sell, you can post your problem here and someone will give you a hint
Posts made by bk7
-
RE: How to check if the last 30 candles are closed above moving average?posted in Questions & Answers
-
RE: How to check if the last 30 candles are closed above moving average?posted in Questions & Answers
@zhahz
loop the last 30 candles and break the loop if a condition isnt met -
RE: Create a pending every new trade at fixed distanceposted in Questions & Answers
if you dont share what you currently have, its hard to see the issue...
-
RE: No Pending order near byposted in Questions & Answers
i would loop the orders and grab the price of the order picked in loop, then you can check if the order is far/close enough to the current marked price and act accordingly.. I hope this helps you
-
RE: No Pending order near byposted in Questions & Answers
@didymario7
no pending just checks if there is no pending order, if you already have an open order you should use the no order block... -
RE: ZIG ZAG problem please help im new to fxdreemaposted in Questions & Answers
ZigZag as an indicator lags 2-5 bars depending on the indicator you use.
if you have a good definition/ruleset of buying selling its no problem. I think miro did some tutorials with zig zags and also supply demand... -
RE: WHAT DOES THE LOOP BLOCK DO????posted in Questions & Answers
@ijoh
you mean loop for objects or orders? -
RE: How do I loop my EA?posted in Questions & Answers
if you dont know (understand properly) the math behind grids better stay away from it...
many made grids, by now i just saw 2 grids that actually work (sure there are more that work, but you most likely will never see the logic/calculation behind it)
its way easier to understand supply demand and some other strategies...
-
RE: How do I loop my EA?posted in Questions & Answers
@tipsywisdom said in How do I loop my EA?:
this is what the curve of a gridder looks like. Someone built this once and gave it to me....but its just not a good system.the concept isnt bad.. the only issue is the closing logic!
In the backtest you can see how much pending gain there is, which isnt trailed properly....
-
RE: Need help in creating a MT4 scanner using custom indicatorsposted in Questions & Answers
@nagstn
as i said before the scanner is more or less the last step, first you have to look at the indicators the type of data they have and how to bring things together.if you want a sample this might help you but it isn't for total beginners, maybe it helps
-
RE: NoPosition and NoPosition/orderposted in Bug Reports
@implosion
so you are most likely using just custom code for your projects? -
RE: profitable expert advisorposted in General Discussions
why should someone show you his profitable ea instead of using it for himself?
-
RE: Need help in creating a MT4 scanner using custom indicatorsposted in Questions & Answers
@l-andorrĂ
thanks for you hint! since i don't know what indicators he is talking about it is a more general answer to his question. he would have to check/decide what works or not. I am just trying to help him find the right direction... -
RE: Need help in creating a MT4 scanner using custom indicatorsposted in Questions & Answers
@nagstn you could start with defining what you want to scan and how the dashboard should look like then think of the best way to structure the data gathering process...
-
RE: Trading costs toolposted in Tutorials by Users
@roar
maybe the average spread of the last 5 10 or 15 bars would be nice as well? -
RE: Strategy Results, Good? Bad? Okay?posted in General Discussions
@jsauter86
nice approach! I have kind of a similar situation an ea that creates nice profits but just on a single type of market didn'T figure out by now how to quantify that fitting condition^^^
you can go for a vps. costs like 8-9 Euro a month and works fine for just testing. if you want to have some details on that just write me a pm because i am not sure if it is allowed to post such links here...
-
RE: Limit trade per signalposted in Questions & Answers
as far as i remember the halftrend right they don't use 0 they just have empty values
so if you want to check if a value is zero you would have to open a custom code block
if (halftrend_value0 == EMPTY_VALUE) buy=1
if you want to get non empty values the code looks like this
if (halftrend_value!= EMPTY_VALUE) buy =1
-
RE: Stop Trading when the daily target or loss is achievedposted in Questions & Answers
yes his solutions:
part 1: grabs once a day the balance calculates the stoplevel and stores it and turns on all blocks
part 2: needs to run before any main calculation of the ea takes place (checks if balance below if true close all positions and turn off blocks (dont turn off the once a day block) -
RE: Stop Trading when the daily target or loss is achievedposted in Questions & Answers
@sauce
as i said before i would make the check before opening a position and if you have reached the limit dont open it and send a message mail alert whatever, so you can enter the trade if you want manually or just stay away.would look like this
once a day / at a specific time = store balance/equity to variable
calc stop level and store it to a variablebefore opening a new trade check if current balance/equity is higher than or euqal stop level if yes open trade if no alert,message, or simply nothing