Download MetaTrader 5

Need help with timed based accounting for non-Forex robot ...

To add comments, please log in or register
Marcus Roberts
139
Marcus Roberts  

Hi guys, I am having the hardest time getting my indicator to update the result info for a trade that was placed on a previous bar.

Can anyone offer a solution or maybe point me in the right direction. It would greatly be appreciated. Many thanks!!! 

Here is a the code snippet:

if(
(Condition &&AutoTrades<1
)
)
{
if(DisplayMoneyManager>0)
{
AutoTrades+=1;
if(Bar0<Time[Candle+Trade])
{
//Trade placed once on bar zero...
OptionsAutoTraderPut();
Bar0=Time[Candle+Trade];
}
AutoTrades=0;
if(Bar0<Time[Candle+2])
{
CrossDown[Candle]=TargetH-Spacing*Point;
//If a trade was placed at 12:08:05, I am needing to get the result of that trade back after and within 12:10 *round 2min* 
//Results to be printed... 
BearWins();
Bar0=Time[Candle+Trade];
}
}
}
***Note: Each of the arguments work when used separately. I am having a problem getting them to work together.
whroeder1
15023
whroeder1  
sssolepro: I am having the hardest time getting my indicator to update the result info for a trade that was placed on a previous bar.
Makes no sense. Indicators update every bar.
To add comments, please log in or register