Though this thread might help eliminate some extra work for Funyoo here.
As many of us have a fair understanding how coding works instead of requesting Funyoo to always make different enhancements perhaps we could post a request here for the coding as a reference for everyone so if someone wants to add a magic number or a trailing stop then the coding for that sequence could be posted here either by Funyoo or other members and a simply copy and paste into the existing program would eliminate a bit of extra work for Funyoo.
As an example to add a magic number to a program:
Add this to the inputs section.
extern int Magic = 75631;
Now search for:
OrderSend
You will find something like this:
OrderSend(symbol, OP_BUY, lot, price, Slippage, Stoploss, Takeprfit, 0, Magic, 0, Blue);
Where :
OrderSend(Symbol{}, is the currency
OP_BUY, is the order type
lot, is the lot size
Slippage is the slippage
Stoploss, is the Stoploss
TakeProfit is the takeprofit
Magic, is the magicnumber
Blue is the color of the dot for the order on the chart.
Do not attempt to change other things here other than add the MAgicnumber as there are other things that have to be done to add a Stoploss etc,
You will most likely find something like this.
OrderSend(symbol, OP_BUY, lot, price, 0, 0, 0, 0, 0, 0, Blue);
so you will only add the "Magic where the 0 is located
Hope this helps here
Pheniox



Reply With Quote
