Topic: request a indicator that Exit at certain hours or minutes after trade
Hi Footon
Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made?
Thank!
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Technical Indicators → request a indicator that Exit at certain hours or minutes after trade
Hi Footon
Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made?
Thank!
Hi Footon
Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made?
Thank!
No, indicators don't have access to position info, so it can't be done. You can though use N-bar Exit as a sort of workaround.
SurfingWave wrote:Hi Footon
Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made?
Thank!
No, indicators don't have access to position info, so it can't be done. You can though use N-bar Exit as a sort of workaround.
Thanks! Will try your suggestions.
Tried your suggestion fall short.
trade at certain time base on Server trade starts 8am to 1pm.
here my ChatGpT code:
// YourMainScriptOrIndicator.mq4
#include "TradingTimeFunctions.mqh"
// Trading hours in server time (in hours)
int tradingStartTime = 8;
int tradingEndTime = 13;
// The start function
int start()
{
// Check if trading is allowed
if (IsTradingAllowed(tradingStartTime, tradingEndTime))
{
// Trading is allowed during these hours
Print("Trading is allowed. Current server time: ", TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
}
else
{
// Trading is not allowed outside these hours
Print("Trading is not allowed. Current server time: ", TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
}
return 0;
}
Because, I'm lacking of coding knowledge. I wanna make sure this code works in FSB pro. I willing to pay for the service pm me lets negotiate. Pardon my grammar second language.
footon wrote:SurfingWave wrote:Hi Footon
Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made?
Thank!
No, indicators don't have access to position info, so it can't be done. You can though use N-bar Exit as a sort of workaround.
Thanks! Will try your suggestions.
I don't understand, do you want a custom indicator or you are trying to modify exported EAs?
Secondly, is this about defining a trading session? You said you want to close positions after certain time has passed. N-bar indi works well for that in most cases. If you are trying to limit trading time then use Entry Time indi.
Tried your suggestion fall short.
trade at certain time base on Server trade starts 8am to 1pm.
here my ChatGpT code:
// YourMainScriptOrIndicator.mq4
#include "TradingTimeFunctions.mqh"// Trading hours in server time (in hours)
int tradingStartTime = 8;
int tradingEndTime = 13;// The start function
int start()
{
// Check if trading is allowed
if (IsTradingAllowed(tradingStartTime, tradingEndTime))
{
// Trading is allowed during these hours
Print("Trading is allowed. Current server time: ", TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
}
else
{
// Trading is not allowed outside these hours
Print("Trading is not allowed. Current server time: ", TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
}return 0;
}Because, I'm lacking of coding knowledge. I wanna make sure this code works in FSB pro. I willing to pay for the service pm me lets negotiate. Pardon my grammar second language.
SurfingWave wrote:footon wrote:No, indicators don't have access to position info, so it can't be done. You can though use N-bar Exit as a sort of workaround.
Thanks! Will try your suggestions.
Forex Software → Technical Indicators → request a indicator that Exit at certain hours or minutes after trade
Powered by PunBB, supported by Informer Technologies, Inc.