Hello,
I would like to offer up and share my ATR TM (Trade Manager) EA, for some help in debugging the Order X commands and Path value returns.
Attached is the EA, ScottsPLDot Indicator and a screenshot of the Warning errors.
The EA uses ATR and risk percentage to calculate lot sizes for the pair based on dollar value, to get equal dollar value across all pairs and sets TP, SL, TS levels based on ATR for each pair. The ScottsPLDot Indicator is just used to visualize those TP, SL, TS levels. I do not use the lines as an indicator for entries. But to see if the TP targets are obtainable.
I manually enter trades on H4, D1 charts mostly, using PA, S/R lines, Volume and 8 EMA & 20 SMA, then let this EA manage the trades for me.
The EA maybe a little clunky coding wise, still an ameutor. While I was able to get my primary functions and calculations working, and the EA does function... I have always had a hard time with the Order X commands and control path processes. I would like to have a clean error free EA. I need to learn this, so I am hoping for guidance not neccessarily someone to just fix it. But if someone is feeling that generous... If you could explain what I coded incorrectly and why it needed to be another way, I would be grateful. Yes, I had spent a lot of time in the past with the MQL4 library... just never clicked in my brain.
I sincerely appreciate any guidance from the community.
Thank you.
Michael
P.S. Use at your own risk. I cannot currently gaurantee the values in the display are accurate as I have found some descrepencies on some pairs. Please note, EA only acts on first order. If scalling in, SL/TP value is applied to all orders as the first order. I did this on purpose to close out all orders when the market turned against me or when TP objective was hit. Plus it seemed to be the only way around FIFO.
Special thanks to Bubo who helped in my early education many years ago. And to the creator of the ScottsPLDot indicator.
I would like to offer up and share my ATR TM (Trade Manager) EA, for some help in debugging the Order X commands and Path value returns.
Attached is the EA, ScottsPLDot Indicator and a screenshot of the Warning errors.
The EA uses ATR and risk percentage to calculate lot sizes for the pair based on dollar value, to get equal dollar value across all pairs and sets TP, SL, TS levels based on ATR for each pair. The ScottsPLDot Indicator is just used to visualize those TP, SL, TS levels. I do not use the lines as an indicator for entries. But to see if the TP targets are obtainable.
I manually enter trades on H4, D1 charts mostly, using PA, S/R lines, Volume and 8 EMA & 20 SMA, then let this EA manage the trades for me.
The EA maybe a little clunky coding wise, still an ameutor. While I was able to get my primary functions and calculations working, and the EA does function... I have always had a hard time with the Order X commands and control path processes. I would like to have a clean error free EA. I need to learn this, so I am hoping for guidance not neccessarily someone to just fix it. But if someone is feeling that generous... If you could explain what I coded incorrectly and why it needed to be another way, I would be grateful. Yes, I had spent a lot of time in the past with the MQL4 library... just never clicked in my brain.
I sincerely appreciate any guidance from the community.
Thank you.
Michael
P.S. Use at your own risk. I cannot currently gaurantee the values in the display are accurate as I have found some descrepencies on some pairs. Please note, EA only acts on first order. If scalling in, SL/TP value is applied to all orders as the first order. I did this on purpose to close out all orders when the market turned against me or when TP objective was hit. Plus it seemed to be the only way around FIFO.
Special thanks to Bubo who helped in my early education many years ago. And to the creator of the ScottsPLDot indicator.
Attached Image
Attached File(s)
ATR_TM.mq4
14 KB
|
221 downloads
ScottsPLDot Indicator.ex4
7 KB
|
239 downloads