Author: Copyright 2021, MetaQuotes Software Corp.
0 Views
0 Downloads
0 Favorites
Grid_v1
ÿþ//+------------------------------------------------------------------+

//|                                               accountdetails.mq4 |

//|                                           Copyright © 2006, Iggy |

//|            //+------------------------------------------------------------------+

//|                                                movingaverage.mq4 |

//|                        Copyright 2021, MetaQuotes Software Corp. |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright 2021, MetaQuotes Software Corp."

#property link      "https://www.mql5.com"

#property version   "1.00"

#property strict

#include <Strategies.mqh>

input int Leverage = 100;



GridStrategy* GRID = new GridStrategy();

int OnInit()

{

   double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);

   GRID.SetParams(_Symbol,1442,ask,0.7,5,500,false,Leverage);

   GRID.SetGridParams(9,0.1,1.3,LongShort);

   GRID.Run();

   return(INIT_SUCCEEDED);

}

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {

  delete GRID;

  }

//+------------------------------------------------------------------+

//| Expert tick function                                             |

//+------------------------------------------------------------------+

void OnTick()

  {

  //Print(OpenOrderProfits(1442,_Symbol));

  GRID.onTick();

  }

//+------------------------------------------------------------------+

Comments