I am new to the Forex market and new to this programming language so I am looking for advice in both fronts
I formulated this as pseudo code for what I want to code as a Money Management strategy that is simple and effective (I hope)... I want to make sure that there are no loopholes and any advice on the best way to set this up logically within the EA....
PercentageToTrade = the level of risk you want to set
Line 1 Loss = Max loss is 700 pips from line 1 buy price
Line 2 MaxLoss = 700 – (distance between line 1 and line 2)… checks this at a line 2 level open
Line 3 Max Loss = 700 – (distance between line 1 and line 3)…checks this at a line 3 level open
Line 4 Max Loss = 700 – (distance between line 1 and line 4)…checks this at a line 4 level open
MoneyToTrade = (Account Equity or AccountBalance, whichever is lower) *(PercentageToTrade/100) minus OpenedTradesPotentialLosss
PotentialLossOfOpeningThisTrade(using base lot size and max pip loss)
MoneyToTrade=MoneyToTrade – PotentialLossOfOpeningThisTrade
If MoneyToTrade > 0, Open Trade
Else
Print(“Do not have the funds to open this trade”)
I formulated this as pseudo code for what I want to code as a Money Management strategy that is simple and effective (I hope)... I want to make sure that there are no loopholes and any advice on the best way to set this up logically within the EA....
PercentageToTrade = the level of risk you want to set
Line 1 Loss = Max loss is 700 pips from line 1 buy price
Line 2 MaxLoss = 700 – (distance between line 1 and line 2)… checks this at a line 2 level open
Line 3 Max Loss = 700 – (distance between line 1 and line 3)…checks this at a line 3 level open
Line 4 Max Loss = 700 – (distance between line 1 and line 4)…checks this at a line 4 level open
MoneyToTrade = (Account Equity or AccountBalance, whichever is lower) *(PercentageToTrade/100) minus OpenedTradesPotentialLosss
PotentialLossOfOpeningThisTrade(using base lot size and max pip loss)
MoneyToTrade=MoneyToTrade – PotentialLossOfOpeningThisTrade
If MoneyToTrade > 0, Open Trade
Else
Print(“Do not have the funds to open this trade”)