Download MetaTrader 5
To add comments, please log in or register
Publish programs in Code Base. Improve your rating!
Marcus Roberts
139
Marcus Roberts 2016.07.26 04:20 

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
13610
whroeder1 2016.07.26 16:45  
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