Hi SteveYour coder will have to be happy to have his/her work circulated widely. Please ask him/her to add an appreciation of his/her work to the code. If it works, I will adopt it into my version in post 1 and I always want coding contributions from outside sources to gain their recognition.
It will have to be proven to be robust first.
May I request then for the attached version become the official. It has PositiveSwapOnly removed and replaced with MinSwapToTrade. Something that has helped me in the past few months and no doubt will help in the current climate where most are experiencing DD.
Code: Select all
//extern bool Trade1PositiveSwapTradesOnly=true;
extern double Trade1MinSwapToTrade= -5.0;
//Look for a sell.
if (MarketSellsCount == 0)//LookForTradingOpportunities() is for the starting trade only
if (MarketDirection[pairIndex] == shortdirection) //Market must be falling from a PH.
if (SixthsTradingStatus[pairIndex] == tradableshort)//And must be in the trading area.
if (TradeShort)//User can control the trading direction
if (shortSwap >= MinSwapToTrade[pairIndex])
if (BrokerAllowsHedging || MarketBuysCount == 0)//Either 'hedging' is allowed or there are no market buys open. See note below.
{
SendShort = true;
}//if (BrokerAllowsHedging || MarketBuysCount == 0)//Either 'hedging' ios allowed or there are no market buys open. See note below.
//Look for a buy.
if (MarketBuysCount == 0)//LookForTradingOpportunities() is for the starting trade only
if (MarketDirection[pairIndex] == longdirection) //Market must be rising from a PL.
if (SixthsTradingStatus[pairIndex] == tradablelong)//And must be in the trading area.
if (TradeLong)//User can control the trading direction
if (longSwap >= MinSwapToTrade[pairIndex])
if (BrokerAllowsHedging || MarketSellsCount == 0)//Either 'hedging' is allowed or there are no market buys open. See note below.
{
SendLong = true;
}