@jbillionz Equity is constantly changing, I would record the balance at the start of placing the first trade, balance / 100 * 2 will give you 2%, place the trades with a group if you need to distinguish from other running trades, check the profit of the 2 trades, then close if this number is reached
Best posts made by jstap
-
RE: How do I set a Percentage lossposted in Questions & Answers
-
RE: Timeframe as inputposted in Questions & Answers
it's enum, add how mql5 says: https://docs.mql4.com/constants/chartconstants/enum_timeframes
-
RE: Do EAs with a lot of coding execute slower ?posted in Questions & Answers
yes but it depends what happens where, if you have 1000's of lines of code the EA will likely run slightly slower, but if only a few of the lines are on tick it may still run quick (on tick happen constantly so doing too much on tick uses a lot of computer remorse's)
-
RE: Blocks for "bidding price"posted in Questions & Answers
pink block for each trade - many blocks like modify variable, get the price of the trade/order with a loop. If you need more help on how to get, let me know and I'll give you some help.
-
RE: Where are comments printed now?posted in Questions & Answers
This compiles but does use Print(), not tested so give it a try. I will put everything you need below:

Settings:
LogToConsole(max_win, total);~next~
Global variables, includes:
double total = 0;
double max_win = 0;
int lastLogDay = -1;Custom function:
// Logs values to the Experts tab
void LogToConsole(double max_win, double total)
{
Print("Logging values → Max win: ", DoubleToString(max_win, 2),
", Total: ", DoubleToString(total, 2));
}
-
RE: 2 variables in 1 text outputposted in Questions & Answers
Something like this will do it, just replace words with the relevant ones:

-
RE: How to get the Average Value of the Indicator for nBarsposted in Questions & Answers
Comment blocks can be above or below, in fact any block works above or below, you just need to ensure what is above won't affect the block below. If a comment is below a no trade block, it won't work once a trade is placed, but above it will, it will work before the trade is open, and while it's open. Possibly it's 1 tick behind, but this is unnoticeable.
-
RE: price value of horizontal line into a variableposted in Questions & Answers
use the name - modify variables with line name using object on chart
-
RE: price value of horizontal line into a variableposted in Questions & Answers
when you click on the object does it daw the line? Look in your object list, probably adding a number to the end, so object on chart won't fine it.
-
RE: Compile error occur . Pls help me how to fix.posted in Questions & Answers
This makes sense
why error said "constant" expected -
RE: Ident current timeframe (MT5)posted in Questions & Answers
Created this a long time ago, but this should do it: https://fxdreema.com/shared/LpSPypV5
-
RE: for each position loop not endingposted in Bug Reports
@tipsywisdom You can have blue blocks above pink, generally it is better not to but if being used as a switch you can.
-
RE: ATR pipsposted in Tutorials by Users
@l-andorrà No problem, this picture shows the missing line for the 4th digit.

-
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.
-
RE: Why showing old block settings variables on strategy tester ?posted in Bug Reports
@walter-0 Sorry, I can't help you.
-
RE: Finding Doji Candlesposted in Tutorials by Users
@supersako If anyone clicks your link and then MQ5 button they will get your exact EA fully working, this will also work for MT4 people just need to change the no position blocks for no trade blocks.
-
RE: Get the Current Symbol Based On Manual Trades Orderedposted in Questions & Answers
I am not 100% sure but modify stop needs a pink for each trade above and not be in-between purple and buy, normally best to have pink's alone. In the purple block you have symbol, you can set this to any so it will work from all, you also have this in buy block so, would work with any selected, you also have a controlling block called set market for next blocks. If you test with a combination of these I am sure you will be able to achieve what is required. Hope this helps.
-
RE: FXdreema error or mine?posted in Bug Reports
@alphaomega I am unsure but you could try removing the candle ID for the line, may make no difference but worth a shot
-
RE: Finding Doji Candlesposted in Tutorials by Users
@supersako Hope this helps people, have added formula block so if body is =< total, by taking total, dividing by 100, multiplying by doji percent constant. I haven't tried tried your project, just added to to yours, using defined maths is how I prefer to do things.link text
-
RE: Getting values of indicator from spesific datesposted in Questions & Answers
Between the picture and link you will see how to get the candle ID from date/time and how to get the RSI value from that ID, you can then use the ID variable to get whatever values you need.
Hope this helps
