You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I need some help regarding coding expert advisor.
Let says initial condition:
lots = 0.1
opentrades = 0
Then, how to code this:
-------------------------------------------
checking trade
if previous trade profit resulting +ve money,
opentrades is reset to zero -> opentrades = 0
the lots also reset -> lots = 0.1
if previous trade profit resulting -ve money,
opentrades will increase to 1 -> opentrades = 1
the lots also increase -> lots = 0.2
sell or buy operation coding here with new lots
checking trades
if previous trade profit resulting +ve money,
opentrades is reset to zero -> opentrades = 0
the lots also reset -> lots = 0.1
if previous trade profit resulting -ve money,
opentrades will increase -> opentrades = 2
the lots also increase -> lots = 0.3
sell or buy operation coding here with new lots
and so on...
-------------------------------------------
I know the code on these word in italic only
hope can give me guide for these programming...