Place these codes into your MACD Sample EA.
By adding extern in the code, you'll be able to control the external panel. StopLoss is the variable name. double in the code will allow the StopLoss variable to store fractional figures. We temporary put 50point as the default figure. Anytime when you load the EA on the chart, your default TakeProfit and StopLoss will be 50.
We have defined the parameter. Now we add an extra code into the OrderSend() function. OrderSend fucntion work with these element:
Option = OP_BUY,OP_SELL,OP_BUYSTOP,OP_SELLSTOP,OP_BUYLIMIT,OP_SELLLIMIT
Lot size = Any figure your account able can trade
Order open price = Ask for buy, Bid for sell, or put down a figure if you want to use pending order
Slippage = How many point of slippage allowed
Stop loss = The price when you decided to cut loss
Take profit = The price when you liquidate your profit
Trade comment = To put down a comment on your trade in order to recognize them traded from which trading system
Magic number = Any integer figure. This is for the EA to recognize its an auto trade instead of trader's manual position
Expiry date = Trade will be close after exceeded this amount of time.
Color marking = Trade will be indicate on the chart. Choose a color to represent your buy/sell position, inorder to recognize them in the future.
Original code came with 0 stop loss, so we added some code for this system to recognize a new stop loss we added earlier at the external panel.

5 comments:
hello. I'm interested with your EA: Super Scalper. Where can I get this EA ? = Yohanes
I do not know where can you get that EA. But here is the procedure how I get the EA. Open Meta Editor 4, declare my intended variable, lay down trading rules, enforced it with order sending instruction and order management, and finally construct a simple money management rule that will read the leverage, account balance in conjunction with external risk factor.
I can`t see the code for the stoploss!.
Can you put whole the whole code to the MACD Sample with stoploss?
Or mail it to me at
garxman@hotmail.com
Thanks
What are the results of your latest upgrades to this EA please David? It looks promising and I will be happy to test it.
HI
I am battling to see the code on the picture. Is it possible to get it from you? I would really appreciate it.
my email rudy@firstflex.co.za
Thanks Rudy
Post a Comment