| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Basket SL & TP within a single chart https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4698 |
Page 3 of 4 |
| Author: | renexxxx [ Tue Jun 21, 2016 6:22 am ] |
| Post subject: | Basket SL & TP within a single chart |
The function CheckForClosures() is never called from the OnTick() thread. There is a function inside OnTick() called ShouldTradesBeClosed() that implements the standard MM. Perhaps you should call CheckForClosures() after ShouldTradesBeClosed() (line 6849). In any case, if CheckForClosures() is never called, so it won't do the basket closures. Cheers ... R. |
|
| Author: | traderduke [ Tue Jun 21, 2016 12:17 pm ] |
| Post subject: | Basket SL & TP within a single chart |
Rene I should have known that call was necessary. Thanks, I'll get on it. Ray |
|
| Author: | traderduke [ Tue Jun 21, 2016 1:45 pm ] |
| Post subject: | Basket SL & TP within a single chart |
Rene The basket alone works perfectly! I added a user display and got rid of old code. Now I will test the Atr TP, Be, JS with basket. I'll let you know. I'll either paste the finish product here or start a new thread. a great time to test Basket StopLOOOEESS Thanks a million Ray |
|
| Author: | steven [ Sun Jul 03, 2016 7:13 pm ] |
| Post subject: | Basket SL & TP within a single chart |
Hello to all , i am new here. Actually i also have problem to adding the close all function to my martingale ea . I have searching many forum , but i cant find the answer . after reading this thread , i think i have the problem with the code symbol () too. (I think is a same problem so i reply here .) I want the close all function close profit/loss when it have open more then 1 order . (if single open trade is in profit just let it continue ) When i attach the ea to single pair chart is working fine , but if i attach to more the 1 chart it will direct close when it hit the profit / loss i set . Any one please help me to see , what should i need to change the code to specified the symbol() to the ea . Thank you . Code: Select all Code: Select all |
|
| Author: | renexxxx [ Sun Jul 03, 2016 8:49 pm ] |
| Post subject: | Basket SL & TP within a single chart |
I am not entirely sure that I understand the problem, but I believe that the problem is that NetProfit() returns the total profit of all trades over all symbols combined. If you wish that NetProfit() only returns the total profit of trades for the current symbol, you would need to define NetProfit() like this: Code: Select all |
|
| Author: | steven [ Mon Jul 04, 2016 4:58 am ] |
| Post subject: | Basket SL & TP within a single chart |
Thanks , i will try it in forward test . |
|
| Author: | steven [ Tue Jul 05, 2016 7:38 pm ] |
| Post subject: | Basket SL & TP within a single chart |
Hi renexxxx , is me again . After testing for 1 days , it remain the same . This is my original code , is that the same ? Can you help me to check 1 more time please Code: Select all Code: Select all Code: Select all |
|
| Author: | renexxxx [ Tue Jul 05, 2016 9:37 pm ] |
| Post subject: | Basket SL & TP within a single chart |
OrdersTotal() returns the total number of open orders on the account. I guess that you want a version of OrdersTotal() that only returns the number of open trades for the current symbol, something like this: Code: Select all Hope this helps. |
|
| Author: | steven [ Wed Jul 06, 2016 5:23 am ] |
| Post subject: | Basket SL & TP within a single chart |
Just want to double confirm , which part should be change the code ? The part of Net profit or Close all ? or both also need to change ? Thank you . |
|
| Author: | renexxxx [ Wed Jul 06, 2016 7:16 am ] |
| Post subject: | Basket SL & TP within a single chart |
Steven! Come On! Think for yourself ... Just replace your start() function with this code: Code: Select all I will remove these last few posts from this thread as I don't think that this is of any benefit to anybody else. |
|
| All times are UTC | Page 3 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|