Reply

StrategyQuant 3.8.2 – Custom code modification project

32 replies

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #201967

Project Preview:
As we all know, StrategyQuant is a great tool with huge possibilities and a great development environment for quants,
i have huge respect and cant be thankful enough for a software like this to be open for the average user,
you have to understand that tools like this are built and sold to closed groups and they are paying big sums for things like that,
so as a quant & programmer my self i have plenty respect to Mark Fric and his team for this tool and the community of quant that we have here on the official forum and on my Ryver team chat
trading is a very lonely business and it is great that we have over 100+ members that are sharing ideas and helping each other,
i am a very contributing person in this community as you may or may not know already,
so i am now willing to share my work and improved MQL4 code based on the latest official release of StrategyQuant version 3.8.2,

the thing is that the SQ Development team is so busy with working on the new version of StrategyQuant 4,
many things and bugs are left-out and not been updated, which is perfectly understandable from my side,
the new version of StrategyQuant 4 will be even more futuristic and will offer much more features and a greater professional working interment,
so because there are no current work going on on the current version StrategyQuant 3.8.2 i had to take this project on my self,

many things/bugs ware changed/fixed safety & performance ware also greatly improved, below i will present the full changelog of improvements and enhancements,
this changelog will be updated on the official topic i created on the forum:
OFFICIAL TOPIC: https://strategyquant.com/forum/topic/strategyquant-3-8-2-custom-code-modification-project/
there i will point-out all the progress and post the updates for the code,
each time the code changes i will notify about it on the official topic apointed to this project,

this project will be hopfuly improved by other members from our community but will need to be comfirmed first so that we will be having no errors and new bugs with the time,
please feel free to share suggestions on further improvements and enhancements of this project inside the official topic on the forum dedicated to this project,

also join in to our Ryver team chat group by writing your Email address as a reply in this topic:
RYVER INVITATION REQUEST: https://strategyquant.com/forum/topic/6754-official-community-team-chat-on-ryver-come-and-join-us-benefit-from-both-worlds
Join us to get more out of SQ and enhance your knowledge experience and skills!
would be cool to see you there with us too!

Best Regards, Arik.

Feel free to contact me:
RYVER – I am highly active on Ryver so there is no need to use other ways to contact me, but you can..
Forum PM – https://strategyquant.com/forum/user/8752-karish/
Email – [email protected]

 

 

//== Version 1.0 (Project officially published & started):

  • // * All strategies with (Limit/Stop/Market) orders with Win% of under 50% are buged and wont work the same between SQ to MT4. – (prove me wrong)
    // Avoid this bug by heading to (“Building strategies > Settings > Ranking options > Add a criteria of Win%<=50”).
    //
    // * OrderClose was modified to close the order ASAP and not wait till the slippage is lower then setted by the parameter. – (for those who trade on a MarketMaker broker)
    //
    // * Every single Log move / Error is in much detail now.
    //
    // * when dropping the EA on a chart it will not only show you when for what Pair&TF the EA ment to be traded on,
    // but will automaticly change to the right Pair&TF by it self,
    // there is no possibility to change the Pair&TF back by an accsedent or so, so it is safe and wont trade on a different Pair&TF by mistake.
    //
    // * when dropping the EA on a chart it will show a red warning text on the chart if there are Bars<100 for indicators calculation porpoises & etc.
    //
    // * Automatic MagicNumber is set to each and every EA by default, no need to change each EA manually or checking if there are 2 or more EAs with the same MagicNumber, there is a unique MagicNumber to each and every EA based on the “.str” file name..
    //
    // * Each order is sending a request to the broker’s server before execution,
    // it’s done to eliminate errors and order’s failiur,
    // in addition to this, each and every order will retry the request until sucsess,
    // – OrderSend will try 20 retries each 2 sec it will retry once again and once more (20 times becuase we want to have the order still in our favor),
    // – OrderModify will try 200 retries each 2 sec it will retry once again and once more,
    // – OrderClose & OrderDelete will try 200 retries each 2 sec it will retry once again and once more.
    //
    // * Shows Spread when order has been opened.
    //
    // * MaxSpread was added, you can now choose your spread limitation just as with slippage limitation,
    // if the current spread is higher then the MaxSpread the order will be delayed and will be retried each 2 sec untill sucsess.
    //
    // * Orders became much safer, each order (MarketOrders/PendingOrders) comes with an automatic SL/TP by a must.
    //
    // * Ensures that all orders are closed at the end of the time range/Friday/end of the day.
    //
    // * and much more minor things ware done, cant remember them all XD.

 

Download here

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #202492

Karish, How do manually set the magic number if I want to?

Search for: “string EAName=”

just change the string that comes after the “=”

for example: string EAName=”Strategy 4.10″;

change it to: string EAName=”111″;

*The MagicnNumber should always contain a number..

 

good luck!,

do you think i should add an option to make it possible for the user to choose for an automatic MagicNumber and a Manually set MagicNumber?.., interesting idea.., so that you could change it directly through the EA parameters inside MT4…

0

jmtc1230

Customer, bbp_participant, community, 19 replies.

Visit profile

6 years ago #202548

Karish.  Yes I think that if the magic number is not specified from within MT4 then it should generate one.

 

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #202595

Version 1.7 (14.12.17):

  •  * Error management has been modified and now wont loop the error message (ERR_NO_ERROR).
  •  * Slippage message on every order was removed until further notice because it is visually bugged, it will be added in the future.
  •  * Number of retries of Modifying, Closing & Deleting an order was increased from 40 to 80 for safety reasons.
  •  * Fixed a bug with the orders management loops.
  •  * Better support for ‘Intraday’ charts,
     There is no need to change anything in the code in order to run backtesting/trading via the plugins anymore. – (AZ-INVEST plugins)
  •  * IMPORTANT!:
     My suggestions are to limit the Win% so that Win% wont be lower then 30% and not higher then 96% (Based on Stop/Limit Pending Orders only)
     if you using Market Orders stay above 50% Win% if you want your results accurate.

—————————

DOWNLOAD HERE:

https://drive.google.com/file/d/126lnUqOlbvrb7swnW78AqXOIHK1Kpivt/view

0

Fx Mena

Customer, bbp_participant, community, sq-ultimate, 23 replies.

Visit profile

6 years ago #202605

Thanks Mr Karish for the Help to Optimize SQ 3, i prefer this version better that SQ4 , i believe that SQ is a deception through coplexity and The horrible interface, i hope that all updates and functionalites used the same interface of SQ3 .

PROBLEM: For Renko Chart strategies ( Bars Mode 0)  and  (Bars Mode 1 with wicks )

I used CSV2FXT converter ( From AZ INVEST ) to generate FXT Backtest file using Tick Data Suite backtester, as known that The script of Az Invest ( Link ) generate also a History Data file for Renko then imported to StrategyQuant , when test my strategies in SQ i got GOOD result but when i test in Metatrader i got BAD results on 99% Modeling backtest.

  1. Is there any idea why!
  2.  is there any idea to create EA to export Closed Bars to CSV ( Make a mirror of renko chart during backtest to CSV data)

 

0

jmtc1230

Customer, bbp_participant, community, 19 replies.

Visit profile

6 years ago #202879

Karish – the last link posted does not work.

 

Correction – sorry. Yes it does work.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #202886

Thanks Mr Karish for the Help to Optimize SQ 3, i prefer this version better that SQ4 , i believe that SQ is a deception through coplexity and The horrible interface, i hope that all updates and functionalites used the same interface of SQ3 . PROBLEM: For Renko Chart strategies ( Bars Mode 0) and (Bars Mode 1 with wicks ) I used CSV2FXT converter ( From AZ INVEST ) to generate FXT Backtest file using Tick Data Suite backtester, as known that The script of Az Invest ( Link ) generate also a History Data file for Renko then imported to StrategyQuant , when test my strategies in SQ i got GOOD result but when i test in Metatrader i got BAD results on 99% Modeling backtest.

  1. Is there any idea why!
  2. is there any idea to create EA to export Closed Bars to CSV ( Make a mirror of renko chart during backtest to CSV data)

 

Hi,

I talked with Arthur (AZ-INVEST) about it, he told me there is nothing he can do, it all depends on SQ Dev team,

i used to use AZ-INVEST scripts and generate strategies on them but all the results are inaccurate,

i would recommend you to just use the standard charts until SQ4 comes out.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #202896

Version 1.8 (19.12.17):

  • * Order management loops ware updated and a bug with order not retrying correctly when flooding the broker’s server.
  • * Few more very minor bugs ware fixed.

—————————

DOWNLOAD LINK:

https://drive.google.com/file/d/1FFCoLKFWdxpvGtgFoWDipm1Bu63Vb2gE/view

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #202980

Version 1.9 (21.12.17):

  • * Order management loops ware updated again, the loops ware not working as they should be.
  • * Discovered a bug by default in the original code, some strategies not calculating the open price of the order in the right way,
     i will try to fix it in the future, but it is something to do with only the “TodayOpen” building block,
     do not use this building block until further notice.

 

—————————

DOWNLOAD LINK:
https://drive.google.com/file/d/1oA_-4q0NiEIvPDJChMGVQkQrOtQXOL5L/view

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #203240

Version 2.0 (29.12.17):

  • * Another bug with the “ThisBarOpen” building block, using this building block causes inaccurate results between SQ&MT4.
    do not use this building block until further notice.
  • * Minor bug was fixed.

—————————

DOWNLOAD LINK:

https://drive.google.com/file/d/18hrH6z0-RlRtN_d_uNsMW6zJEbtULR1G/view

0

jenial

Customer, bbp_participant, community, sq-ultimate, 7 replies.

Visit profile

6 years ago #203533

thanks karish for this tool…can you explain how to install?

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #203541

thanks karish for this tool…can you explain how to install?

The installation is simple:

Drop the folders from the .rar file into your SQ’s “code” folder, an example would be:  “C:\SQ Instances\SQ\code”

replace the old files with the new files

*there is no closure/restarting of any open SQ instances that are running needed.

Enjoy.

0

Angel Talavera

Customer, bbp_participant, community, sq-ultimate, 15 replies.

Visit profile

6 years ago #232481

Thank you Karish for the fantastic contribution you are making. I am testing your modified code and have many things that I needed. I have several Eas in the VPS and I have made a function to delete all the arrows in the graph, would it be possible to modify the function so that only those that enter and leave the market are shown? Something like seeing trades true / false extern bool:

Function:

//Delete all objects chart

int totalObjects = ObjectsTotal();

 

for(int i=totalObjects – 1 ; i >= 0 ; i– ) {
ObjectDelete(ObjectName(i));
}

save memory pc

Attachments:
You must be logged in to view attached files.

https://angeltalavera.com

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

6 years ago #232484

Currently waiting for SQ4 so no reason to mod anything..

0

developeralgo222

Subscriber, bbp_participant, community, 0 replies.

Visit profile

6 years ago #217917

Karish,

 

The MagicNumber code does not seem to work  in actual MT4 terminal it display’s the Maximum MagicNumber value

Magic #2147483647

 

 

0

developeralgo222

Subscriber, bbp_participant, community, 0 replies.

Visit profile

6 years ago #217918

This post is awaiting moderation.

Karish,

 

The MagicNumber code does not seem to work  in actual MT4 terminal it display’s the Maximum MagicNumber value

Magic #2147483647

Refer to this: it is should work

https://www.mql5.com/en/forum/141280

 

 

 

0

Viewing 15 replies - 16 through 30 (of 32 total)

1 2 3