Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to fix method name expected error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to fix method name expected error

    HI i have this code and cant figure out how ot fix this name expected. There isnt suppose to be a method it just a if statement for main strategy 34B and filters

    Code:
    if (longsOn)
                    {
    //                    Print("34B " + " Trade34B: " + Trade34B + " UseVolFilter: "
    //                    + UseVolFilter + " MFI Filter:" + UseMFIFIlter + " Stoch Filter:" +
    //                    UseStochFilter + " Time: " + Time[0]
    //                    +" Volume: " + VOL1[0] + " MFI Value: " + MFI1[0] + " StochValue: " + StochasticsFast1.D[0]);
                        if (    
    
                            ((Trade34B  == true) && (UseMFIFIlter == true)  [COLOR=#2ecc71][B] // ON THIS line i get error name expected[/B][/COLOR]
                            && (emaAngulation > EMAAngulation * TickSize) // EMA Angulation is greater then (x)
                            && (emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize) // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
                            && (Close[1] < Open[1])     // previous bar bearish
                            && (Low[0] < Low[1])         // and low of signal bar is lower then previous bar                
                            && (Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34B * TickSize)
                            && !(Open[1] < High[1] && Close[0] < High[1])
                            && (EMA(200)[0] < slowEMA[0])
                            && (MFI1[0] >= LevelForLongs))
    
                            ((Trade34B  == true) && (UseVolFilter == true)
                            && (emaAngulation > EMAAngulation * TickSize) // EMA Angulation is greater then (x)
                            && (emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize) // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
                            && (Close[1] < Open[1])     // previous bar bearish
                            && (Low[0] < Low[1])         // and low of signal bar is lower then previous bar                
                            && (Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34B * TickSize)
                            && !(Open[1] < High[1] && Close[0] < High[1])
                            && (EMA(200)[0] < slowEMA[0])
                            && (VOL1[0] >= VolReading  ))
    
                            ((Trade34B  == true) && (UseStochFilter == true)
                            && (emaAngulation > EMAAngulation * TickSize) // EMA Angulation is greater then (x)
                            && (emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize) // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
                            && (Close[1] < Open[1])     // previous bar bearish
                            && (Low[0] < Low[1])         // and low of signal bar is lower then previous bar                
                            && (Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34B * TickSize)
                            //&& !(Open[1] < High[1] && Close[0] < High[1])
                            && (EMA(200)[0] < slowEMA[0])
                            && (StochasticsFast1.D[0] <= StochLongLevels))
    
                            ((Trade34B == true)
                            && (emaAngulation > EMAAngulation * TickSize) // EMA Angulation is greater then (x)
                            && (emaAngulationXBarsBefore > EMAAngulationXBarsBefore * TickSize) // EMA Angulation X bars before - angulation not on current bar but 5 bars before for example
                            && (Close[1] < Open[1])     // previous bar bearish
                            && (Low[0] < Low[1])         // and low of signal bar is lower then previous bar
                            && (Low[0] < slowEMA[0] && Close[0] > slowEMA[0] + ABEMA34B * TickSize)
                            //&& !(Open[1] < High[1] && Close[0] < High[1])
                            && (EMA(200)[0] < slowEMA[0])
                            && (Close[0] < CurrentDayOHL().CurrentHigh[4] - DistanceToOHL * TickSize)))  // distance to be greater then close of signal bar and current high)
    
                                {    
                                    entryOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market, TradeSize, 0, 0, "", "34B");
                                    Print("34B " + " Close price is: " + Close[0] + " Open price is: " + Open[0] );
                                    return;                
                                }
                        ​
    Last edited by tkaboris; 02-18-2023, 08:47 AM.

    #2
    Never mind figure it out

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X