Close at Total Profit - page 2

cangoo77  

i found a free expert in the market that works well.. but in demo! in fact on my mt5 demo (amp) isn't applied spread and commisions and the price @market is always well .... so i tried it in real on micro futures and the exepert works fine but the strategy not well...


in a couple of words, i wanted to build a spread strategy, where i enter @market with two correlated, s&p and dowjones. buy s&p and sell dj. close the operation with few gain... 10 $. and repet it again and again.

with the orders @ market isn't well becouse the price is to the best... maybe i have to try with limit orders but this need an other expert that with one click place a limit order at 1 tick from current price into the two correlated.

Keith Watford  

A post has been deleted.

Please do not link to any market products, even free ones.

Fernando Carreiro  
Charmaine Smit: Hi, This is my code to close ALL OPEN POSITIONS if total is in profit. (For cTrader bot - you can modify it) It will also close all the trades that is not in profit - as long as the total amount is in profit.

Please don't take offense, but posting cTrader C# code as a solution, on a MetaTrader MQL forum thread about MQL issue, does not help anyone. Not only are the languages different but the environments, libraries and functionality are all different and incompatible.

It is like answering a question about English grammar with a Russian grammar example.

Vladimir Karputov  
Charmaine Smit:


Please insert the code correctly: when editing a message, press the button     Codeand paste your code into the pop-up window. (The first time I corrected your message)