Needs a little tweaking - page 11

 
I understand what buttons to press, but I don't understand the lines you added
 
Сергей Дыбленко:
I know what buttons to press, but I don't know what lines you've added.

There are small buttons that draw lines - to move them to the right place, where there will be a lot of profit.

you just choose in the setup where that line is going to open.

Here's just one setting for these lines.

input string   R_Orders_="----- Revers H Line ---------"; //
input bool     ReversOrders     = false;         // Revers Horizontal Line
 
ok.thanks............. I'll try
 

How do I change the lot size in your utility? No matter what I do, it's always 0.01!

 
Сергей Дыбленко:

How do I change the lotness in your utility? No matter what I do, it's always 0.01!

I'll check it now - I might have missed it, put in a function

------------------------------

corrected

Files:

- Thanks! for the tip

 

have you tried to make an EA from the inuk I sent you the code for?

i'm trying now........ but i'm always short on brains!

//+------------------------------------------------------------------+
//|                                                          RSI.mq4 |
//|                               Copyright © 2016, Хлыстов Владимир |
//|                                                cmillion@narod.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2016, Хлыстов Владимир"
#property link      "cmillion@narod.ru"
#property strict
#property description "советник по RSI"
#property description "sell при пересечение сверху вниз 70 и на buy снизу вверх 30"
#property description "стопы и тейки можно выстовить в настройках советника"
//--------------------------------------------------------------------
//---- indicator parameters
extern int ADXperiod1 = 10;
extern int ADXperiod2 = 14;
extern int ADXperiod3 = 20;
//--- 
/*
#define Alvl -35.0
#define Alvl2 -30.0
#define Alvl3 -40.0 */
//---
extern int     stoploss             = 0;
extern int     takeprofit           = 250;
extern int     slippage             = 0;
extern int     Magic                = 777;
extern double  Lot                  = 0.1;
//---
string Unq="TASSKlT",Label;
int MxP,MnP,MdP;
double was_alert_hl = EMPTY_VALUE; // Horizontal line
double was_alert_au = EMPTY_VALUE; // Arrow up
double was_alert_ad = EMPTY_VALUE; // Arrow down
//---- buffers
double To[];
double Tc[];
double ADX1[];
double ADX2[];
double ADX3[];
double Up[];
double Dn[];
double Ex[];
//--------------------------------------------------------------------
void OnTick()
{
   for (int i=0; i<OrdersTotal(); i++)
      if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         if (OrderSymbol()==Symbol() && Magic==OrderMagicNumber()) return;
   double RSI0  = iCustom(Symbol(),0,"0A",ADXperiod1,ADXperiod2,ADXperiod3,PRICE_OPEN,0);
   double RSI1  = iCustom(Symbol(),0,"0A",ADXperiod1,ADXperiod2,ADXperiod3,PRICE_OPEN,1);
   double SL=0,TP=0;
   
   if (RSI0 > ADXperiod1 && RSI1 < ADXperiod3)
   {
      if (takeprofit!=0) TP  = NormalizeDouble(Ask + takeprofit*Point,Digits);
      if (stoploss!=0)   SL  = NormalizeDouble(Ask - stoploss*  Point,Digits);     
      if (OrderSend(Symbol(),OP_BUY, Lot,NormalizeDouble(Ask,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
     // if (OrderSend(Symbol(),OP_BUYSTOP, Lot,NormalizeDouble(Ask,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
   }
   if (RSI0 < ADXperiod1 && RSI1 > ADXperiod3)
   {
      if (takeprofit!=0) TP = NormalizeDouble(Bid - takeprofit*Point,Digits);
      if (stoploss!=0)   SL = NormalizeDouble(Bid + stoploss*  Point,Digits);            
      if (OrderSend(Symbol(),OP_SELL,Lot,NormalizeDouble(Bid,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
     // if (OrderSend(Symbol(),OP_SELLSTOP,Lot,NormalizeDouble(Bid,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
   }
}
//--------------------------------------------------------------------
 
Сергей Дыбленко:

have you tried to make an EA from the inuk I sent you the code for?

I'm trying now........ but I'm always short on brains!

What kind of indicator is that? Do you have one?

iCustom(Symbol(),0,"0A"



 
tried to attach it to the Expert Advisor you gave for MACD - no luck....... opens either sell or buy
 
Сергей Дыбленко:
i tried to attach it to the MACD expert - it did not work out....... - it only opens either sell or buy.

You're not doing it right - it won't work.

You need to deal with the code in the terminal (MACD Sample.mq4)

If you understand how it works, you may get an idea of what is connected to what.

 
Alexsandr San:

You're not doing it right - it won't work.

You need to deal with the code in the terminal (MACD Sample.mq4)

if you do understand how it works, you may get an idea of what's going to be screwed on.

Alexsandr San:

If you build it wrong, it may turn out to be a failure.

you need to handle the code, which is located in the terminal (MACD Sample.mq4 )

if you understand how it works, you may get an idea of what's screwed on.

Reason: