Select the last closed deal (trade) to further work
Here are some examples of codes for set counters based on "Count"
If you only want to execute your code blocks "only once per bar" it's important to check if there is new bar arrived or not
This code block loops through all opened position and do trailing based on Ask and Bid prices
This code block detects a New Bar or a New Candle when it has received
The product rule -: " Embedding any limitations by time, account type or number, financial instrument, etc. into your Program is prohibited. All such actions will be considered as unfriendly to the Buyer and are prohibited. " I want to code an EA to work only on special instrument also in specific
I have a product which works if use with the proper strategy. but the strategy is in pdf format. I've already uploaded it in my Google Drive. can I put the Google Drive Link in my product description so people can download the strategy there? As I know the MQL has updated polices for the product
I want to draw color candles in MT4. but the bellow code doesn't do anything. The code doesn't return any error but not work as expected. Can someone tell me what the issue is? I tried with ChatGPT to find an answer, it doesn't give any correct answer for this
I have drawn a trend line in the bellow chart. I want to know the angle of this trendline so I can use it to trade based on some other conditions. but I don't know how to calculate it. do you have any idea how to do this. I don't need you to code for me. give me an idea how to do this. Your help is
I tried bellow code, nothing is happening. When I check object list, arrow object has created but it's not visible anyway in the sub window no matter how. the object's time coordinates are always showing as 1970.01.01 not matter how I try to set it to the current date time. the arrows I'm trying to
if the chart height is 250 pixels and width is 450 pixels when my indicator applies to the chart, I want my indicator to resize the chart height to 450 pixels and width to 720 pixels. How can I achieve this? I have tried to do this way, but nothing is working. it is possible to resize the chart size
All the testing parameter was same. except the modeling. I'm fully confused with these upside-down results. Can someone please tell me why is that? Results of Modeling - "Every Tick" Results of Modeling - Every Tick based on real ticks
Lot size = Risk Money / ( Stop Loss Distance * Tick Value) This formula retrieves the lot size. Since Price levels are same and tick values are same for every broker that lot size is the common lot size . But the required margin for that lot size could be different due to the leverage of the trading
I use this code block to calculate the lot size. but when it comes to indices the calculation is very different. as an example, this code block calculates lot size for 10,000$ account with 1:500 leverage is around 3.0 lots. but when it comes to balance 6,000$ with 1:100 leverage , the code is
I'm tested an EA using a VPS for a week. the EA ended up with loses ( -30.00$ ). then I did a back test for same week with same EA and with the same parameters that used to trade on live trading. but the strategy tester showed me positive results ( +280.00$ ). The strategy was developed by me. so