Hi Steve,
I wondered why my ScaleoutStopLoss trades were triggered at levels, I didn´t wanted them to. So I had a look at the code and in bool scaleOutStopLoss
Code: Select all
//Calculate the number of levels the price has dropped by.
int levels = (int) (lossPips / distanceBetweenTrades);
"distanceBetweenTrades" needs to be changed into the extern "distanceBetweenLevels".
Your way of explaining your code is awesome and makes a noob undestand what you´re doing and what´s going on. I added my own trigger (not profitable so far) and thanks to your documentation it was quite easy.
I have one question though:
Why do you convert the externs you use into another variable for example
extern int DistanceBetweenLevelsPips= 5,
and later you define
DistanceBetweenLevels = DistanceBetweenLevelsPips;
Why is it better to use another variable instead of the extern variable?
Cheers,
Maximilian