@trader-philipps Thats a nice solution but im missing some parts of it.So lets say i create a global variable for every currency (EUR,USD,JPY,GBP,.....,) then how do i make the condition on open and close trade to check if the base or quote currency i want to trade equals to a variable in order to change its value to 0 or 1. Could you give me an example because im still a newbie.