Need help with coding
phy - thank you for your answer!
I know, how to get information from indicator, I need help how to define point of entry (buy or sell) - how to write pice of code, which will check when sell or buy.
What do you have so far?
Below is piece of code I have made. Is it good description for my strategy ???
Can anyone help me?
double Buy = iCustom(NULL,5,"Zoppoter Signal A",0,1);
double Sell = iCustom(NULL,5,"Zoppoter Signal A",1,1);double TradingTime = TimeHour(Time[0]);
if( TradingTime >= 10 && Buy == 1 )
{FlagShort = true;
}
else if ( TradingTime >= 10 && Sell == -1 )
{
FlagLong = true;
}
if( FlagLong == true && Buy ==1)
{
EnterLong = true; FlagLong = false;
}
else if ( FlagShort == true && Sell == -1 )
{
EnterShort = true; FlagShort = false;
}
Hello,
I'm new on this forum, so first I want to tell Hi to everyone :-)
I nedd help with coding EA.
I have indicator (Zoppoter System A) - it has tree values: 1 (green bar), -1 (red bar) and 0 (no bar).
In my EA I need to observ indicator at 10:00 local time. If indicator has value 1 at 10:00 I need to wait to indicator change to -1 and sell on next bar, if it is -1 at 10:00 I'm waiting to change to 1 and buy on next bar.
Example for this case is here:
Second case is when indicator at 10:00 has 0 value (no bar).
I need to wait for any bar (red or green). When red bar occure I must wait for green bar and then buy at next bar. When green bar occur then I wait for red one and sell on next bar. Sample screen is here:
Thank you all in advance for help :-)