check trading condition block, check margin?
-
Is there a way to check the margin available and limit the trades according to this parameter?
for example only trade if margin is above 500% so there is still room to hedge and add to volume after a number of trades are placed? -
There is something in the Account option in Condition block
-
Hi fxDreema, ive tried to make this condition work but somehow the ea still manages to trade when the margin is below 500%
Also when no trades are running it doesnt trade untill a manual trade is made .
Another thing the block check loss % of equity does not work when combined like the example, it does work with amount of money.
Please help me out with this,
-

-
I also have problems using "Margin Level (in%)". Tried many times ...
There seems to be a problem with the percentage.
What I do now is to use absolute numbers:

But I think, using cash is not as good as using Free margin in %.
So, if someone has an idea? I would be happy hearing from you ...
-
actually I looked into condition block and there are options for margin in %

-
Yes, you can choose "margin in %". But somehow it won't work properly. In fact, it doesn't work at all.
For example, if you want to prevent trading below 500% of free margin: It won't work as shown above. Because naturally no value of percentage for free margin is given when no trade is open. And setting "When no trades: Return 0 (or Return -1)" will prevent every first trade. Because margin level will never be above 500 or 50 or 0 or -1 ... So no trade will happen at all.
If you set "When no trades: Return infinite (biggest possible value)", the equation theoretically could work. But it seems to me, that there is no proper value given back to use in any condition.
This is all I have for now ...

-
when you take conditions as this:

first condition check if there are no trades, if that false (and here are trades) check second condition for margin % value if is above 500 and if thats true, continue with true output (trading or something) ...
-
@miro1360 Yes, thank you! That works.

-
Hi all, (I realise that this is an old thread but i'm just replying to add info for anyone like me who googles this in future)
Thanks for the condition info miro, the blocks didnt seem to work for me but I slightly altered what you'd done and now it works for me
