Re: MT4 Indicator requests and ideas

19011
Woodyz wrote: Wed Jul 26, 2023 2:38 pm Hi Guys & Gals
What I am interested in is a simple EA or Script with an on-screen button to "Close all" the currently open trades (All Pairs) right across the MT4 platform.

Thanks everyone.
Just remember you cant close anything when the powers down
These users thanked the author Chickenspicy for the post (total 2):
Woodyz, RedEye
0 + 0 = 0
Infinite / Infinite = 1
1 way to Heaven & it matters


Re: MT4 Indicator requests and ideas

19012
Woodyz wrote: Wed Jul 26, 2023 2:38 pm Hi Guys & Gals
What I am interested in is a simple EA or Script with an on-screen button to "Close all" the currently open trades (All Pairs) right across the MT4 platform.

Thanks everyone.
Have this one you can choose either the symbol you are on orders or all open orders.
These users thanked the author mrtools for the post (total 3):
Woodyz, DaffyTaffy, mosape

Re: MT4 Indicator requests and ideas

19013
DaffyTaffy wrote: Mon Jul 24, 2023 5:49 pm Hi TradeXtra,

Apologies for the late response. Life gave me some hard lemons but I'm back. Here's my suggestion hopefully it works and I will do my best to keep my English , explanations and logic simple.

Code: Select all

// Define a global variable to track trade status
bool g_tradeOpened = false;

// Function to check entry conditions
bool ShouldEnterTrade()
{
    // Implement your entry conditions logic here
    // For example, you could use indicators, price patterns, etc.
    // Return true when the conditions for entry are met, and false otherwise
    return (your_entry_conditions_here);
}

// Function to place a trade
void OpenTrade()
{
    // Implement your trade execution code here
    // For example, use OrderSend() or any other method you prefer

    // Set g_tradeOpened to true to indicate that a trade has been opened
    g_tradeOpened = true;
}

// Function to close the trade
void CloseTrade()
{
    // Implement your trade closing code here
    // For example, use OrderClose() or any other method you prefer

    // Set g_tradeOpened to false to indicate that the trade has been closed
    g_tradeOpened = false;
}

// The main function where you handle the trading logic
void OnTick()
{
    // Check if the trade is already open
    if (!g_tradeOpened)
    {
        // Check the entry conditions
        if (ShouldEnterTrade())
        {
            // Place a trade
            OpenTrade();
        }
    }
}

To make sure the EA places only one entry per signal, regardless of whether the trade was closed manually or by another EA, you need to implement a mechanism to track the status of the trade and avoid another entry when the conditions are still met. One way to achieve this is by using a global variable to keep track of whether a trade was opened based on a signal.

In this code, the g_tradeOpened variable tracks whether a trade was opened based on a signal. When the FNC EA receives an entry signal and the g_tradeOpened flag is false (meaning no trade is currently open based on a signal), it will execute the OpenTrade() function and set g_tradeOpened to true. As long as g_tradeOpened is true, the FNC EA will not open any new trades based on the same signal.

When you manually close the trade or it gets closed by another EA, the CloseTrade() function should be called, and it will set g_tradeOpened to false, allowing the FNC EA to enter new trades again if the entry conditions are met.

Note: This is a very basic outline of how to meet the one trade per entry condition you described. It may need to be customized depending on the entry conditions and trade execution of the FNC Greedy System. I hope this was helpful to you guys. Let me know if you need any more help.

Best wishes,
DaffyTaffy
Hello Daffy,

This is fantastic! Thank you so much! I'll forward this to Funchi immediately. I'm sure this will be very helpful as this is the only issue with this EA.

I'm so sorry to hear you had some life challenges. I hope you made a nice lemonade out of it. :) and it is resolved.

Thank you so much again. I wish you all the best.
These users thanked the author TradeXtra for the post (total 2):
commodus, DaffyTaffy

Re: MT4 Indicator requests and ideas

19014
TradeXtra wrote: Thu Jul 27, 2023 6:46 am Hello Daffy,

This is fantastic! Thank you so much! I'll forward this to Funchi immediately. I'm sure this will be very helpful as this is the only issue with this EA.

I'm so sorry to hear you had some life challenges. I hope you made a nice lemonade out of it. :) and it is resolved.

Thank you so much again. I wish you all the best.
Ain't nothing I can't bounce back from. I'm glad I was able to help :)
These users thanked the author DaffyTaffy for the post:
TradeXtra


Re: MT4 Indicator requests and ideas

19016
Hello, I would like to know if you could make the signals of an indicator be detected by an EA because I have an indicator that presents the signals, but the automator or signal cataloger does not detect it. The signals I'm interested in are 4 and 5. If it's not too much to ask, adding a sound alert would also be amazing. It is a great volume based indicator.

Re: MT4 Indicator requests and ideas

19018
321win wrote: Fri Jul 28, 2023 1:32 am Hello, I would like to know if you could make the signals of an indicator be detected by an EA because I have an indicator that presents the signals, but the automator or signal cataloger does not detect it. The signals I'm interested in are 4 and 5. If it's not too much to ask, adding a sound alert would also be amazing. It is a great volume based indicator.
This file is decompiled, no one here want to touch on it... more about decompile files HERE
next time for requests, it's not worth writing requests in different threads... it won't guarantee their fulfillment.......
it will only guarantee your banning....


Who is online

Users browsing this forum: Applebot [Crawler], basicinkstinct, ChatGPT [Bot], Forexlearner, global, IBM oBot [Bot], Tradehunter, Yandex [Bot] and 61 guests