You can't add candle price to spread (level - fraction (distance)). You can try candle price + 0 (in adjust put, SymbolInfoInteger(NULL, SYMBOL_SPREAD)
Let me know if it works
You can't add candle price to spread (level - fraction (distance)). You can try candle price + 0 (in adjust put, SymbolInfoInteger(NULL, SYMBOL_SPREAD)
Let me know if it works
The problem is as you said brokers, and assets have different values. FX can only get this from running trades/orders, I put this together that places an order retrieves the value then deletes the order, not ideal but should work. On backtest it didn't work, test it on a live account and see what it does, it should update if the chart symbol is changed: https://fxdreema.com/shared/RAgL4J6Pb
@dancont2025 You are welcome, let me know if you need help elsewhere
@Vortrexcian use that variable in a condition block, TFM != 5 - text block
@Vortrexcian @AlirezaTrade You are welcome, glad it was useful
On MT5 the time frame returned is often a large number not the minutes. This is a way to return the minutes into a variable:
https://fxdreema.com/shared/rCOJx10Bb
You could do something like this: https://fxdreema.com/shared/X2heVLCH
You could remove the % part and just use a fixed value
Various ways, explain more on what you want to do
EA will run on all computers, to prevent this you will need to add the terminal MT licence number to i condition login =! 0000000 - terminate
No mate that is your full project, I am talking about a test project to check sections, limit this to 1 problem, then sort the next, and then add them together to complete your project.
@jacky101 That's good, what's the smallest lot size you used?
Add your link and I'll see if I can see the problem
Not sure what is creating any writing, strip this back and create smaller test projects, then what's wrong can be seen more easily, and by process of elimination, you remove anything that's causing the problems. You can then upload it so someone can help with 1 specific problem at a time.
Add a shared link to show what you have done so far
This should do it change the time value to month() to create the same looking at the month timeframe:
Need to add a shared link to see where any problems might be. FX doesn't work with lot sizes smaller than 0.01
You can only get source code by giving the source code, or an FX-shared link (even then would likely need a full account)
You do know on chart events don't work in backtest?